/* ============================================
   Drougas Skiasi — Consent UI
   Banner, settings dialog, map placeholder
   ============================================ */

/* --- Banner --- */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.1);
  padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom, 0px));
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner-inner {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.consent-banner-copy {
  flex: 1 1 26rem;
  min-width: 0;
}

.consent-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.consent-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 70ch;
}

.consent-text a,
.consent-panel-note a {
  color: var(--accent);
}

/* --- Actions ---
   Accept, reject and settings deliberately share one class: same size, same
   weight, same contrast, same row. Refusing must not be harder to find or
   harder to read than agreeing. */
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.consent-btn {
  flex: 0 1 auto;
  min-width: 8.5rem;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition:
    background 200ms ease,
    color 200ms ease;
}

.consent-btn:hover {
  background: var(--accent);
  color: #fff;
}

.consent-btn:focus-visible {
  outline: 3px solid var(--heading);
  outline-offset: 2px;
}

/* The banner owns the bottom of the screen while a choice is pending, so the
   sticky call bar steps aside rather than sitting on top of it. The phone
   number stays reachable from the header CTA throughout. */
body.has-consent-banner .sticky-call {
  display: none;
}

/* --- Settings dialog --- */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(26, 23, 20, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.consent-overlay[hidden] {
  display: none;
}

body.consent-panel-open {
  overflow: hidden;
}

.consent-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: min(38rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.5rem;
}

.consent-panel:focus {
  outline: none;
}

.consent-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.consent-panel-title {
  font-size: 1.2rem;
}

.consent-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-soft);
  cursor: pointer;
  padding: 0 0.25rem;
}

.consent-close:hover {
  color: var(--accent);
}

.consent-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.consent-group {
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  background: var(--surface-warm);
}

.consent-group-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.consent-group-row input[type='checkbox'] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  flex: none;
  cursor: pointer;
}

.consent-group-row input[type='checkbox']:disabled {
  cursor: default;
}

.consent-group-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--heading);
  font-size: 0.95rem;
  cursor: pointer;
}

.consent-group-row input[type='checkbox']:disabled + .consent-group-title {
  cursor: default;
}

.consent-group-text {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.consent-panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.consent-panel-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-soft);
}

/* --- Map placeholder ---
   Shown wherever the Google Maps frame would be while consent is not in place,
   so the visitor can turn on that one embed in context. */
.map-consent {
  border: 1px dashed var(--line);
  border-radius: 0.6rem;
  padding: 1rem;
  background: var(--surface-warm);
}

.map-consent[hidden] {
  display: none;
}

.map-consent-text {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.map-consent-note {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
}

.map-consent-note a {
  color: var(--accent);
}

/* --- Footer legal row --- */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 1rem;
  margin: 0 0 0.6rem;
}

.footer-legal a,
.footer-legal button {
  color: rgba(253, 250, 246, 0.78);
  font-size: 0.82rem;
  font-family: inherit;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.footer-legal a:hover,
.footer-legal button:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-legal a:focus-visible,
.footer-legal button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .consent-actions {
    width: 100%;
  }

  .consent-btn {
    flex: 1 1 8rem;
  }

  .consent-panel-foot .consent-btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-btn {
    transition: none;
  }
}
