/* ============================================================================
   PeakCare — Consent / Cookie banner
   Dark-glass, gold-accent. Non-blocking bottom sheet, mobile full-width.
   ========================================================================== */

#pc-consent,
#pc-consent * { box-sizing: border-box; }

#pc-consent {
  position: fixed;
  z-index: 3000;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 720px;
  background: rgba(10, 16, 22, 0.97);
  border: 1px solid rgba(201, 169, 110, 0.28);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.35rem 1.5rem 1.25rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.62;
  color: rgba(232, 234, 240, 0.82);
  opacity: 0;
  transform: translateX(-50%) translateY(24px);
  transition: opacity .32s ease, transform .32s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
#pc-consent.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#pc-consent .pc-c-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #F0DFA0;
  letter-spacing: .01em;
  margin: 0 0 .4rem;
}
#pc-consent .pc-c-text {
  margin: 0 0 .9rem;
  color: rgba(232, 234, 240, 0.72);
}
#pc-consent .pc-c-text a {
  color: #E8C97A;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#pc-consent .pc-c-text a:hover { color: #F0DFA0; }

#pc-consent .pc-c-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
#pc-consent button {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  min-height: 44px;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(201, 169, 110, 0.3);
  background: transparent;
  color: #E8EAF0;
  transition: background .2s, border-color .2s, color .2s;
}
#pc-consent button:hover {
  border-color: rgba(201, 169, 110, 0.75);
  background: rgba(201, 169, 110, 0.08);
}
#pc-consent button:focus-visible {
  outline: 2px solid #E8C97A;
  outline-offset: 2px;
}
#pc-consent .pc-c-accept {
  background: linear-gradient(135deg, #F0DFA0 0%, #C9A96E 52%, #A8855A 100%);
  border-color: transparent;
  color: #14100A;
}
#pc-consent .pc-c-accept:hover {
  background: linear-gradient(135deg, #F7E9B4 0%, #D8B97C 52%, #B8935F 100%);
  color: #14100A;
}
#pc-consent .pc-c-essential {
  border-color: rgba(232, 234, 240, 0.28);
}
#pc-consent .pc-c-settings {
  margin-left: auto;
  border-color: transparent;
  color: rgba(232, 234, 240, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Settings view ─────────────────────────────────────────────────────── */
#pc-consent .pc-c-panel { display: none; }
#pc-consent.is-settings .pc-c-intro { display: none; }
#pc-consent.is-settings .pc-c-panel { display: block; }

.pc-c-row {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .7rem 0;
  border-top: 1px solid rgba(201, 169, 110, 0.12);
}
.pc-c-row:first-of-type { border-top: none; }
.pc-c-row .pc-c-meta { flex: 1 1 auto; min-width: 0; }
.pc-c-row .pc-c-name {
  display: block;
  font-weight: 600;
  color: #E8EAF0;
  font-size: .8125rem;
  margin-bottom: .15rem;
}
.pc-c-row .pc-c-desc {
  display: block;
  font-size: .75rem;
  line-height: 1.55;
  color: rgba(232, 234, 240, 0.62);
}
.pc-c-switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  margin-top: .15rem;
}
.pc-c-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.pc-c-switch .pc-c-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(232, 234, 240, 0.14);
  border: 1px solid rgba(232, 234, 240, 0.2);
  transition: background .2s, border-color .2s;
}
.pc-c-switch .pc-c-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(232, 234, 240, 0.7);
  transition: transform .2s, background .2s;
}
.pc-c-switch input:checked + .pc-c-track {
  background: rgba(201, 169, 110, 0.55);
  border-color: rgba(232, 201, 122, 0.7);
}
.pc-c-switch input:checked + .pc-c-track::after {
  transform: translateX(20px);
  background: #F0DFA0;
}
.pc-c-switch input:focus-visible + .pc-c-track {
  outline: 2px solid #E8C97A;
  outline-offset: 2px;
}
.pc-c-switch input:disabled { cursor: not-allowed; }
.pc-c-switch input:disabled + .pc-c-track { opacity: .65; }

/* ── Persistent footer entry ───────────────────────────────────────────── */
.pc-consent-link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.pc-consent-link:hover { color: #E8C97A; }

@media (max-width: 640px) {
  #pc-consent {
    left: 0;
    bottom: 0;
    transform: translateY(100%);
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 1.15rem 1.15rem 1.1rem;
    max-height: 88vh;
    overflow-y: auto;
  }
  #pc-consent.is-open { transform: translateY(0); }
  #pc-consent .pc-c-actions { gap: .5rem; }
  #pc-consent .pc-c-actions button { flex: 1 1 100%; }
  #pc-consent .pc-c-settings { margin-left: 0; flex: 1 1 100%; }
}

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