/* 1.8.537 P2-1: first-visit overlays (cookie bar + builders popup) match .footer-plate. */
/* First-visit overlays: match .footer-plate (main-495.min.css) sitting on .site-footer #0a0d24.
   Mobile first. Cookie bar must take less than today's 15% of a 390×844 phone (129 px). */

.idx-info-plate,
#bp535 .bp535__box,
#cookie-notice.cookie-notice-visible {
  box-sizing: border-box;
  position: relative;
  background-color: #0a0d24 !important;
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-top: 1px solid rgba(255, 255, 255, .12) !important; /* replace the cookie bar's 3px gold strip */
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 28px rgba(0, 0, 0, .22) !important;
  color: rgba(247, 245, 242, .78);
  font-family: "Montserrat", system-ui, sans-serif;
}

#bp535 .bp535__box::before,
#cookie-notice.cookie-notice-visible::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f3c91a, transparent);
  opacity: .7;
  pointer-events: none;
}

/* --- Builders popup box --- */
#bp535 .bp535__box {
  width: min(460px, 100%);
  padding: 1.25rem 1.2rem 1.3rem; /* was 50px 24px 26px */
  text-align: left;
}
#bp535 .bp535__title {
  margin: 0 2.5rem .9rem 0;
  padding: 0;
  font: 600 clamp(.78rem, 4.3vw, 1.05rem)/1.2 "Oswald", "Arial Narrow", system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap; /* headlines stay on one line */
}
#bp535 .bp535__btns { display: flex; flex-direction: column; gap: .65rem; }
#bp535 .bp535__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: .7rem 1.4rem;
  border: 0;
  border-radius: 0; /* match the live Donate button in the Cares plate */
  background: #f3c91a;
  color: #0f143a;
  text-decoration: none;
  font-family: "Oswald", "Arial Narrow", system-ui, sans-serif;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(243, 201, 26, .18);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
#bp535 .bp535__btn:hover,
#bp535 .bp535__btn:focus-visible {
  background: #fff;
  color: #0f143a;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(243, 201, 26, .3);
}
#bp535 .bp535__name,
#bp535 .bp535__sub { color: #0f143a; }
#bp535 .bp535__x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px; /* keep the 44 px target */
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
}
#bp535 .bp535__x:hover { background: rgba(255, 255, 255, .12); color: #f3c91a; }
#bp535 .bp535__x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* --- Cookie bar: floating plate, not a full-bleed strip --- */
#cookie-notice {
  left: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 40rem;
  margin-inline: auto;
  height: auto;
  z-index: 100000;
  font-size: .84rem;
  line-height: 1.4;
  background: transparent !important; /* plate styles above apply when visible */
  border: 0 !important;
  box-shadow: none !important;
}
#cookie-notice .cookie-notice-container {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "text close"
    "btns close";
  align-items: center;
  gap: 8px 10px;
  padding: 0.85rem 0.7rem 0.9rem 1.1rem !important;
  color: rgba(247, 245, 242, .78) !important;
  text-align: left;
  background: transparent;
}
#cookie-notice .cn-text-container {
  grid-area: text;
  margin: 0;
  color: rgba(247, 245, 242, .78);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: .84rem;
  line-height: 1.4;
}
#cookie-notice .cn-buttons-container {
  grid-area: btns;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 0;
}
#cookie-notice #cn-accept-cookie {
  flex: 0 0 auto;
  min-height: 40px;
  min-width: 44px;
  padding: .55rem 1.15rem;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f3c91a !important;
  color: #0f143a !important;
  font-family: "Oswald", "Arial Narrow", system-ui, sans-serif !important;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(243, 201, 26, .18);
}
#cookie-notice #cn-accept-cookie:hover,
#cookie-notice #cn-accept-cookie:focus-visible {
  background: #fff !important;
  color: #0f143a !important;
}
#cookie-notice #cn-more-info {
  background: transparent !important;
  color: #f3c91a !important;
  border: 0 !important;
  padding: .4rem .5rem;
  min-height: 40px;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}
#cookie-notice #cn-more-info:hover,
#cookie-notice #cn-more-info:focus-visible { color: #fff !important; }
#cookie-notice .cn-close-icon,
#cookie-notice #cn-close-notice {
  grid-area: close;
  position: static;
  margin: 0;
  width: 44px;
  height: 44px;
  opacity: .9;
  justify-self: end;
  align-self: start;
}
#cookie-notice .cn-close-icon::before,
#cookie-notice .cn-close-icon::after { background-color: #fff; }
#cookie-notice .cn-close-icon:hover::before,
#cookie-notice .cn-close-icon:hover::after { background-color: #f3c91a; }
#cookie-notice .cn-close-icon:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Keep back-to-top / configurator offsets in sync with the shorter bar. */
body:has(#cookie-notice.cookie-notice-visible) { --idx-cookie-h: 88px; }

@media (min-width: 720px) {
  #cookie-notice {
    left: 50%;
    right: auto;
    bottom: 20px;
    width: min(40rem, calc(100% - 40px)) !important;
    transform: translateX(-50%);
  }
  #cookie-notice .cookie-notice-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px 16px;
    padding: 0.9rem 0.7rem 0.9rem 1.2rem !important;
  }
  #cookie-notice .cn-text-container { flex: 1 1 auto; }
  #cookie-notice .cn-buttons-container { flex: 0 0 auto; }
  body:has(#cookie-notice.cookie-notice-visible) { --idx-cookie-h: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  #bp535 .bp535__box { transition: none; }
}

/* 1.8.537: the plate rule above sets position:relative for the gold line; the cookie bar must stay fixed. */
#cookie-notice,
#cookie-notice.cookie-notice-visible { position: fixed !important; }

/* 1.8.537: cookie bar layout fixes found in Local testing (close X pseudo-elements need a positioned parent; compact height). */
#cookie-notice.cookie-notice-visible .cookie-notice-container {
  display: grid !important;
  grid-template-columns: 1fr auto;
  grid-template-areas: "text close" "btns close";
  align-items: center;
  gap: 6px 10px;
  padding: .8rem .5rem .85rem 1rem !important;
  min-height: 0;
}
#cookie-notice.cookie-notice-visible .cn-close-icon,
#cookie-notice.cookie-notice-visible #cn-close-notice {
  position: relative !important;
  inset: auto !important;
  grid-area: close;
  justify-self: end;
  align-self: start;
  width: 44px;
  height: 44px;
  margin: 0;
}
@media (min-width: 720px) {
  #cookie-notice.cookie-notice-visible .cookie-notice-container {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 12px 16px;
    padding: .7rem .5rem .7rem 1.2rem !important;
  }
  #cookie-notice.cookie-notice-visible { bottom: 20px !important; }
}

/* compact pass */
#cookie-notice.cookie-notice-visible .cn-text-container { font-size: .78rem; line-height: 1.35; }
#cookie-notice.cookie-notice-visible .cookie-notice-container { padding: .6rem .4rem .65rem .9rem !important; gap: 4px 8px; }
#cookie-notice.cookie-notice-visible #cn-accept-cookie,
#cookie-notice.cookie-notice-visible #cn-more-info { min-height: 38px; padding-top: .4rem; padding-bottom: .4rem; }
@media (min-width: 720px) {
  #cookie-notice.cookie-notice-visible { width: min(48rem, calc(100% - 40px)) !important; max-width: 48rem; }
  #cookie-notice.cookie-notice-visible .cookie-notice-container { padding: .55rem .5rem .55rem 1.2rem !important; }
}
@media (min-width: 720px) {
  #cookie-notice.cookie-notice-visible { left: 50% !important; right: auto !important; transform: translateX(-50%); }
}
