/* ================================================
   DOOR COLOR CHANGER – ULTIMATE PREMIUM VERSION
   ================================================ */

:root {
  --dcc-primary-bg: rgba(255, 255, 255, 0.02);
  --dcc-glass-bg: rgba(255, 255, 255, 0.04);
  --dcc-border: rgba(255, 255, 255, 0.08);
  --dcc-text: inherit;
  --dcc-text-muted: rgba(255, 255, 255, 0.5);
  --dcc-accent: #e1b12c;
  /* Premium Gold */
  --dcc-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --dcc-shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.4);
  --dcc-radius: 24px;
  --dcc-transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --dcc-swatch-size: 70px;
}

.dcc-container {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 4rem;
  background: var(--dcc-primary-bg);
  border-radius: var(--dcc-radius);
  border: 1px solid var(--dcc-border);
  backdrop-filter: blur(40px);
  box-shadow: var(--dcc-shadow-lg);
  color: var(--dcc-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

.dcc-main-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: start;
}

.dcc-sidebar-container {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Colors Sidebar */
.dcc-colors-sidebar {
  max-height: 800px;
  overflow-y: auto;
  padding: 3rem 3rem 0 0;
  /* Final padding for top/side clearance */
  scrollbar-width: thin;
  scrollbar-color: var(--dcc-border) transparent;
}

.dcc-colors-sidebar::-webkit-scrollbar {
  width: 4px;
}

.dcc-colors-sidebar::-webkit-scrollbar-thumb {
  background: var(--dcc-border);
  border-radius: 10px;
}

.dcc-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 2.5rem 2rem;
}

.dcc-color-swatch-wrapper {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: var(--dcc-transition);
  outline: none;
}

.dcc-color-swatch {
  width: var(--dcc-swatch-size);
  height: var(--dcc-swatch-size);
  border-radius: 50%;
  position: relative;
  background: var(--swatch-color);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.4),
    inset 0 -2px 5px rgba(0, 0, 0, 0.2),
    var(--dcc-shadow-sm);
  transition: var(--dcc-transition);
  overflow: hidden;
}

.dcc-color-swatch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
}

.dcc-color-swatch::after {
  content: '';
  position: absolute;
  top: 6%;
  left: 15%;
  width: 70%;
  height: 35%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
  border-radius: 50% 50% 45% 45%;
}

.dcc-color-swatch-wrapper:hover .dcc-color-swatch {
  transform: translateY(-10px) scale(1.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dcc-color-swatch-wrapper.selected .dcc-color-swatch {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px var(--dcc-accent), 0 15px 30px rgba(0, 0, 0, 0.4);
}

.dcc-swatch-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: var(--dcc-transition);
}

.dcc-color-swatch-wrapper.selected .dcc-swatch-inner {
  opacity: 1;
}

.dcc-check {
  color: var(--dcc-accent);
  font-size: 1.8rem;
  font-weight: 900;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.dcc-swatch-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dcc-swatch-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dcc-text);
  margin-bottom: 0.25rem;
}

.dcc-swatch-ral {
  font-size: 0.9rem;
  color: var(--dcc-accent);
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* Preview Area */
.dcc-preview-area {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  position: sticky;
  top: 2rem;
}

.dcc-door-preview {
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 80%);
  border-radius: var(--dcc-radius);
  padding: 6rem 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dcc-border);
}

.dcc-door-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

.dcc-door-frame {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 2.15;
  z-index: 2;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
}

.dcc-door {
  width: 100%;
  height: 100%;
  background: #ccc;
  position: relative;
  border: 14px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  transition: background 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* Ultimate Door Texture */
.dcc-door-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.15) 0%, transparent 5%, transparent 95%, rgba(0, 0, 0, 0.15) 100%),
    repeating-linear-gradient(90deg, transparent 0, transparent 40px, rgba(0, 0, 0, 0.02) 42px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 40%, rgba(0, 0, 0, 0.1) 100%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Door Grooves */
.dcc-door-grooves {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-evenly;
  pointer-events: none;
}

.dcc-door-grooves span {
  width: 2px;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  box-shadow:
    -1px 0 2px rgba(255, 255, 255, 0.05),
    1px 0 2px rgba(0, 0, 0, 0.2);
  mix-blend-mode: multiply;
}

/* Glass Refined */
.dcc-glazing {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.dcc-glass {
  aspect-ratio: 1.1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(200, 220, 255, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 10px 30px rgba(0, 0, 0, 0.3),
    0 1px 1px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

/* Room Reflection */
.dcc-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, transparent 40%, rgba(255, 255, 255, 0.1) 45%, rgba(255, 255, 255, 0.2) 50%, transparent 55%);
  animation: shimmer 8s infinite linear;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%) translateY(-100%);
  }

  to {
    transform: translateX(100%) translateY(100%);
  }
}

/* Curved Pull Handle (C-Shape) ULTIMATE */
.dcc-handle-pull {
  position: absolute;
  right: 3%;
  /* 3% on Desktop */
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 28%;
  /* Significantly shortened for better proportion */
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.dcc-pull-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 17px;
  /* Matched mount width for rectangular silhouette */
  background: linear-gradient(to right,
      #222 0%,
      #777 20%,
      #eee 50%,
      #777 80%,
      #222 100%);
  border-radius: 4px;
  /* Natural rectangular curve at the ends */
  box-shadow:
    -8px 8px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
  z-index: 2;
}

.dcc-pull-mount {
  position: absolute;
  right: 28px;
  /* User provided precision value */
  width: 18px;
  /* User provided precision value */
  height: 40px;
  /* User provided precision value */
  background: linear-gradient(to bottom,
      #444 0%,
      #888 50%,
      #444 100%);
  z-index: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.dcc-pull-mount.top {
  top: 0;
  border-top-left-radius: 10px;
}

.dcc-pull-mount.bottom {
  bottom: 0;
  border-bottom-left-radius: 10px;
}

.dcc-pull-mount::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 120%;
  background: rgba(0, 0, 0, 0.2);
  filter: blur(2px);
}

/* Info Card Refined */
.dcc-info-card {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 32px;
  border: 1px solid var(--dcc-border);
  backdrop-filter: blur(50px);
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dcc-info-swatch {
  width: 100px;
  height: 100px;
  border-radius: 28px;
  border: 5px solid #fff;
  box-shadow: var(--dcc-shadow-lg);
}

.dcc-info-details h3 {
  font-size: 2rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.dcc-info-details p {
  font-size: 1.6rem;
  margin: 0.4rem 0 0;
  color: var(--dcc-accent);
  font-weight: 950;
  /* Extra bold for contact/contrast */
  letter-spacing: 0.1em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Premium Scroll Badge - SIDE MOUNTED */
.dcc-scroll-indicator {
  position: absolute;
  right: -2.8rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: rgba(0, 0, 0, 0.6);
  /* Darker background for extreme contrast */
  padding: 0.8rem 1.8rem;
  border-radius: 40px;
  border: 1px solid var(--dcc-accent);
  backdrop-filter: blur(20px);
  color: var(--dcc-accent);
  font-weight: 900;
  /* Bolder text */
  font-size: 0.75rem;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  /* Much stronger shadow */
  white-space: nowrap;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  overflow: hidden;
}

.dcc-scroll-icon {
  width: 14px;
  height: 22px;
  border: 1.5px solid var(--dcc-accent);
  border-radius: 10px;
  position: relative;
  display: flex;
  justify-content: center;
}

.dcc-mouse-wheel {
  width: 2px;
  height: 6px;
  background: var(--dcc-accent);
  border-radius: 1px;
  margin-top: 4px;
  animation: dccPulseMove 2s infinite ease-out;
}

@keyframes dccPulseMove {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(6px);
    opacity: 0;
  }
}

.dcc-scroll-indicator::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  animation: dccShine 4s infinite;
}

@keyframes dccShine {
  0% {
    transform: translateX(-100%);
  }

  20%,
  100% {
    transform: translateX(100%);
  }
}

.dcc-scroll-indicator.hidden {
  opacity: 0;
  transform: translateY(-50%) rotate(90deg) translateX(30px);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .dcc-container {
    padding: 3rem 2rem;
  }

  .dcc-handle-pull {
    right: 1% !important;
    /* Forces 1% on Tablet view */
    transform: translateY(-50%) scale(0.7);
    height: 25%;
  }

  .dcc-main-wrapper {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .dcc-preview-area {
    position: static;
    order: 1;
    /* Door on top */
  }

  .dcc-colors-sidebar {
    max-height: 500px;
    order: 2;
    /* Colors below */
    padding-right: 0;
  }
}

@media (max-width: 600px) {
  .dcc-container {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .dcc-header h2 {
    font-size: 2.8rem;
  }

  .dcc-colors-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .dcc-swatch-size {
    --dcc-swatch-size: 60px;
  }

  .dcc-info-card {
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }

  .dcc-info-swatch {
    width: 70px;
    height: 70px;
  }

  .dcc-info-details h3 {
    font-size: 1.5rem;
  }

  .dcc-info-details p {
    font-size: 1.2rem;
  }

  /* Scale and fix Curved Handle for mobile */
  .dcc-handle-pull {
    width: 25px;
    height: 30%;
    right: -2% !important;
    transform: translateY(-50%) scale(0.6);
  }

  .dcc-pull-bar {
    width: 8px;
    /* Balanced for mobile */
  }

  .dcc-pull-mount {
    width: 7px;
    /* User provided precision value */
    height: 16px;
    /* User provided precision value */
    right: 18px;
    /* User provided precision value */
  }

  /* Refine premium badge for mobile */
  .dcc-scroll-indicator {
    right: -1rem;
    padding: 0.6rem 1.4rem;
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

/* Theme compatibility: Light */
@media (prefers-color-scheme: light) {
  :root {
    --dcc-primary-bg: rgba(255, 255, 255, 0.9);
    --dcc-glass-bg: #fff;
    --dcc-border: #eee;
    --dcc-text: #111;
    --dcc-text-muted: #777;
  }

  .dcc-door {
    border-color: rgba(0, 0, 0, 0.05);
  }
}