/* Chester Windows shared glass finish.
   Surface styling only; existing layout, text and preview artwork retained. */
:root {
  --cw-glass-border: rgba(166,203,226,.32);
  --cw-glass-highlight: rgba(255,255,255,.10);
  --cw-glass-shadow: 0 14px 34px rgba(2,12,22,.20),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -1px 0 rgba(255,255,255,.025);
}

/* Reflective edges across the established panel families.
   Keep each tool's existing base colour and text contrast. */
body .card,
body .doors-feature-card,
body .doors-resource-card,
body .doors-intro,
body .doors-local-section,
body .doors-security-credential,
body .doors-security-system,
body .door-information-main .info-hero,
body .door-information-main .info-section,
body .door-information-main .info-contact,
body #contact article,
body .options-panel,
body .preview-panel,
body .designer-panel,
body .designer-preview:not(.is-preview-fullscreen),
body .final-action-card,
body .designer-enquiry-dialog {
  border-color: var(--cw-glass-border) !important;
  box-shadow: var(--cw-glass-shadow) !important;
}

/* Dark content surfaces: strong navy tint keeps text readable.
   Solid tint is also the fallback when backdrop blur is unavailable. */
body .card,
body .doors-feature-card,
body .doors-resource-card,
body .doors-intro,
body .doors-security-credential,
body .doors-security-system,
body .door-information-main .info-hero,
body .door-information-main .info-section,
body .door-information-main .info-contact,
body #contact article {
  background: linear-gradient(145deg,
    rgba(255,255,255,.065), rgba(255,255,255,0) 48%),
    linear-gradient(180deg,
    rgba(23,63,92,.92), rgba(12,37,55,.95)) !important;
}

/* Header retains its established dimensions and positioning. */
body .site-header,
body .designer-site-header {
  background: linear-gradient(180deg,
    rgba(28,65,91,.95), rgba(9,30,47,.96)) !important;
  box-shadow: 0 8px 24px rgba(2,12,22,.18),
    inset 0 -1px 0 rgba(216,180,102,.26) !important;
}

/* Light Designer landing header keeps its existing dark lettering. */
body.door-type-landing .designer-topbar {
  background: linear-gradient(145deg,
    rgba(255,255,255,.96), rgba(239,246,250,.93)) !important;
  box-shadow: 0 8px 24px rgba(13,43,64,.08),
    inset 0 -1px 0 rgba(13,43,64,.10) !important;
}

/* A light reflection without altering tool preview colours. */
body .options-panel,
body .preview-panel,
body .designer-panel,
body .designer-preview:not(.is-preview-fullscreen) {
  background-image: linear-gradient(145deg,
    rgba(255,255,255,.08), rgba(255,255,255,0) 48%) !important;
}

/* Glass menus remain more opaque for legibility over photographs. */
body .nav-dropdown-menu,
body .mobile-menu,
body .designer-site-menu nav {
  background: linear-gradient(145deg,
    rgba(28,65,91,.98), rgba(9,30,47,.98)) !important;
  border-color: var(--cw-glass-border) !important;
  box-shadow: var(--cw-glass-shadow) !important;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body .card,
  body .doors-feature-card,
  body .doors-resource-card,
  body .doors-intro,
  body .door-information-main .info-hero,
  body .door-information-main .info-section,
  body .door-information-main .info-contact,
  body #contact article {
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    backdrop-filter: blur(10px) saturate(115%);
  }
  body .nav-dropdown-menu,
  body .mobile-menu,
  body .designer-site-menu nav {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

/* Clear action states preserve the existing keyboard outlines. */
body .card:hover,
body .doors-feature-card:hover,
body .doors-resource-card:hover,
body .windows-main .window-card:focus-within {
  border-color: rgba(245,215,142,.65) !important;
}

/* Lower blur cost on small screens. */
@media(max-width:700px) {
  body .card,
  body .doors-feature-card,
  body .doors-resource-card,
  body .doors-intro,
  body .door-information-main .info-hero,
  body .door-information-main .info-section,
  body .door-information-main .info-contact,
  body #contact article {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }
}
@media(prefers-reduced-transparency:reduce) {
  body .card,
  body .doors-feature-card,
  body .doors-resource-card,
  body .doors-intro,
  body .door-information-main .info-hero,
  body .door-information-main .info-section,
  body .door-information-main .info-contact,
  body #contact article,
  body .nav-dropdown-menu,
  body .mobile-menu,
  body .designer-site-menu nav {
    background: #12344d !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media print {
  body .card,
  body .door-information-main .info-hero,
  body .door-information-main .info-section {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none !important;
  }
}


/* MANAGED DESKTOP DROPDOWNS */
@media(min-width:901px) {
  body .desktop-nav > .cw-managed-dropdown {
    position:relative;
    z-index:auto !important;
  }
  body .desktop-nav > .cw-managed-dropdown.open {
    z-index:100 !important;
  }
  body .desktop-nav > .cw-managed-dropdown::after,
  body .desktop-nav > .cw-managed-dropdown > .nav-dropdown-menu::before {
    display:none !important;
    pointer-events:none !important;
  }
  body .desktop-nav > .cw-managed-dropdown > .nav-dropdown-menu {
    top:100% !important;
    left:0 !important;
    right:auto !important;
    margin-top:0 !important;
    transform:none !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transition:opacity .12s ease !important;
    max-width:calc(100vw - 32px);
  }
  body .desktop-nav > .cw-managed-dropdown.open > .nav-dropdown-menu {
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
  }
}

/* CLICK-ONLY DROPDOWN VISIBILITY */
@media(min-width:901px) {
  body .desktop-nav > .nav-dropdown:not(.open) > .nav-dropdown-menu {
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
  body .desktop-nav > .nav-dropdown.open > .nav-dropdown-menu {
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
  }
  body .desktop-nav > .nav-dropdown::after,
  body .desktop-nav > .nav-dropdown > .nav-dropdown-menu::before {
    display:none !important;
    pointer-events:none !important;
  }
}
