/* Intracon Consulting landing v2 - consent banner, calendar placeholder, "Cookie settings" button.
   Loaded after styles.css; uses its tokens (--navy, --orange, --pale, --white, --gutter, --fs-*).
   Square corners, 2px borders, no shadows (focus rings excepted). */

/* `hidden` must win over any display value set below or by .btn */
.consent[hidden],
.consent [hidden],
.meetings [hidden] { display: none !important; }

/* ---------- consent banner (non-modal, fixed to the bottom) ---------- */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900; /* above the fixed header (100), below the skip link (1000) */
  background: var(--navy);
  color: var(--white);                 /* 17.6:1 on navy */
  border-top: 2px solid var(--orange);
  font-family: var(--font-sans);
  font-size: clamp(.875rem, .9375vw, 1.0625rem);
  line-height: 1.5;
  padding-top: clamp(1rem, 1.5vw, 1.75rem);
  padding-bottom: calc(clamp(1rem, 1.5vw, 1.75rem) + env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.consent:focus { outline: none; }
/* div...[tabindex="-1"] on purpose: styles.css removes the ring from div[tabindex="-1"]:not(.form-card):focus
   with specificity (0,3,1); this matches it and wins by source order. */
div.consent[tabindex="-1"]:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--orange); }

.consent__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2.5vw, 3rem);
  max-width: var(--container);
  margin: 0 auto;
}
.consent__copy { flex: 1 1 auto; min-width: 0; max-width: 78ch; }
.consent__copy p { margin: 0; }
.consent__copy .consent__title { font-weight: 700; font-size: 1.125em; margin-bottom: .35em; }
.consent__copy .consent__current { margin-top: .5em; font-weight: 700; }
.consent__link { color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: .2em; white-space: nowrap; }
.consent__link:hover { color: var(--orange); }   /* orange on navy: 7.2:1 */

.consent__actions { flex: none; display: flex; gap: clamp(.75rem, 1vw, 1.25rem); }

/* Accept and Decline: same size, same style, same contrast. No primary/secondary hierarchy. */
.consent .consent__btn {
  min-width: 9.5rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  font-size: clamp(1rem, 1.0417vw, 1.25rem);
  font-weight: 700;
  text-transform: none;
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 0;
  cursor: pointer;
}
.consent .consent__btn:hover { background: var(--white); color: var(--navy); }

/* The site focus ring is white + navy, which disappears on a navy background. */
.consent a:focus-visible,
.consent button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--navy), 0 0 0 6px var(--orange); }

@media (prefers-reduced-motion: no-preference) {
  .consent:not([hidden]) { animation: consent-in .25s ease-out both; }
  @keyframes consent-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
}

/* Keep focused content and the page end clear of the banner while it is open (WCAG 2.4.11). */
html.has-consent-banner { scroll-padding-bottom: var(--consent-h, 0px); }
html.has-consent-banner body { padding-bottom: var(--consent-h, 0px); }

@media (max-width: 900px) {
  .consent__inner { flex-direction: column; align-items: stretch; }
  .consent__copy { max-width: none; }
  .consent__actions { justify-content: flex-start; }
}
@media (max-width: 599px) {
  .consent__actions { flex-direction: column; }
  .consent .consent__btn { width: 100%; min-width: 0; }
}

/* ---------- HubSpot Meetings: reserved box + placeholder panel ---------- */
.meetings {
  position: relative;
  min-height: 700px;                       /* reserved so the embed causes no layout shift */
  margin-top: clamp(1.5rem, 3vw, 3.75rem);
}
.meetings:focus { outline: none; }
div.meetings[tabindex="-1"]:focus-visible { outline: none; box-shadow: var(--focus); } /* same specificity note as .consent */
.meetings .meetings-iframe-container { min-height: inherit; width: 100%; }
.meetings .meetings-iframe-container iframe { display: block; width: 100%; max-width: 100%; border: 0; }

.meetings__placeholder {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 1.5vw, 1.75rem);
  padding: clamp(1.5rem, 3vw, 3.75rem);
  text-align: center;
  color: var(--navy);
  background: var(--pale);
  border: 2px solid var(--navy);
}
.meetings__placeholder p { margin: 0; }
.meetings__title { font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-sub); line-height: 1.1; }
.meetings__gate { display: flex; flex-direction: column; align-items: center; gap: clamp(1.25rem, 2vw, 2.25rem); }
.meetings__notice, .meetings__loading, .meetings__noscript { max-width: 46ch; font-size: var(--fs-body); line-height: 1.5; }
.meetings__loading { font-weight: 700; }
/* navy, not --red: #DF2935 on --pale is 4.3:1 and fails AA for body text */
.meetings__error { max-width: 46ch; font-size: var(--fs-body); font-weight: 700; color: var(--navy); padding: .75rem 1rem; border: 2px solid var(--red); }
.meetings__load { cursor: pointer; text-transform: none; }
.meetings__direct, .meetings__noscript a { color: var(--navy); font-weight: 700; font-size: var(--fs-body); text-decoration: underline; text-underline-offset: .2em; }
.meetings__direct:hover, .meetings__noscript a:hover { text-decoration-thickness: 3px; }

@media (max-width: 767px) {
  .meetings { min-height: 760px; }
  .meetings__load { width: 100%; }
}

/* ---------- "Cookie settings": a <button data-consent-open> that reads as a link ---------- */
button[data-consent-open] {
  -webkit-appearance: none;
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
button[data-consent-open]:hover { text-decoration-thickness: 2px; }
