/* GuideUp — cookie consent (blocks interaction until a choice is stored) */
:root {
  --cc-primary: #c46a4a;
  --cc-primary-d: #a85a3c;
  --cc-secondary: #2f6f6b;
  --cc-cookie-card: #f2f4f7;
  --cc-text: #28303f;
  --cc-black: #1e1e1e;
  --cc-border: #e1e3ef;
  --cc-bg: #fff;
}

html.cookie-consent--pending {
  overflow: hidden;
  height: 100%;
}

html.cookie-consent--pending body {
  overflow: hidden !important;
  touch-action: none;
}

#cookie-consent-blocker {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(30, 32, 46, 0.45);
  pointer-events: auto;
}

#cookie-consent-banner {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 99991;
  /* for absolutely positioned close */
  --cc-close-size: 42px;
  --cc-close-gap: 10px;
  /* Narrow on small viewports; widened in steps below */
  width: min(100% - 24px, 100%);
  max-height: min(88vh, 100%);
  overflow: auto;
  background: var(--cc-bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  padding: 20px 18px 18px;
  pointer-events: auto;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--cc-text);
}

@media (min-width: 480px) {
  #cookie-consent-banner {
    width: min(100% - 32px, 520px);
    padding: 22px 20px 18px;
  }

  .cc-banner-close {
    top: 4px;
    right: 18px;
  }
}

@media (min-width: 640px) {
  #cookie-consent-banner {
    width: min(100% - 36px, 600px);
  }
}

@media (min-width: 768px) {
  #cookie-consent-banner {
    width: min(100% - 40px, 680px);
    padding: 24px 22px 20px;
  }

  .cc-banner-close {
    top: 6px;
    right: 20px;
  }
}

@media (min-width: 900px) {
  #cookie-consent-banner {
    width: min(100% - 48px, 820px);
  }
}

/* Large desktop: wide bar, primary actions side by side */
@media (min-width: 1024px) {
  #cookie-consent-banner {
    width: min(100% - 64px, 1180px);
    padding: 26px 32px 22px;
  }

  .cc-banner-close {
    top: 8px;
    right: 30px;
  }
}

@media (min-width: 1280px) {
  #cookie-consent-banner {
    width: min(100% - 80px, 1240px);
    padding: 28px 36px 24px;
  }

  .cc-banner-close {
    top: 10px;
    right: 34px;
  }
}

.cc-banner-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--cc-black);
  line-height: 1.3;
}

.cc-banner-close {
  position: absolute;
  top: 2px;
  right: 14px;
  z-index: 2;
  width: var(--cc-close-size);
  height: var(--cc-close-size);
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 23px;
  font-weight: 300;
  line-height: 1;
  color: #6a7680;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  outline: none;
  box-shadow: none;
}

.cc-banner-close:hover {
  color: var(--cc-black);
}

.cc-banner-close:focus,
.cc-banner-close:focus-visible {
  outline: none;
  box-shadow: none;
  background: transparent;
}

/* Copy = heading + paragraph only */
.cc-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
  /* keep long titles / wrap clear of the × control */
  padding-right: calc(var(--cc-close-size) + var(--cc-close-gap));
}

/* Medium & down: copy block first, then actions block full width below */
.cc-banner-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Large: ~70% copy / ~30% actions (flex 7 : 3) */
@media (min-width: 1024px) {
  .cc-banner-copy {
    padding-right: 0;
    flex: 6 1 0;
    min-width: 0;
  }

  .cc-banner-body {
    flex-direction: row;
    align-items: flex-end;
    gap: 32px;
  }

  .cc-banner-actions {
    flex: 3 1 0;
    min-width: 0;
    width: auto;
    max-width: none;
  }

  .cc-banner-actions > .cc-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    max-width: none;
    padding-inline: 12px;
  }
}

.cc-banner-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  margin: 0;
  min-width: 0;
}

/* Primary buttons always one row; manage link full width on next row, centered */
.cc-banner-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.cc-banner-actions > .cc-btn {
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  max-width: none;
}

.cc-banner-actions > .cc-manage-link {
  flex: 1 0 100%;
  margin-top: 0;
  text-align: center;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  border: 2px solid transparent;
  text-align: center;
}

.cc-btn:active {
  transform: scale(0.98);
}

.cc-btn--outline {
  background: #fff;
  border-color: var(--cc-primary);
  color: var(--cc-primary);
}

.cc-btn--outline:hover {
  background: rgba(196, 106, 74, 0.06);
}

.cc-btn--primary {
  background: var(--cc-primary);
  border-color: var(--cc-primary);
  color: #fff;
}

.cc-btn--primary:hover {
  background: var(--cc-primary-d);
  border-color: var(--cc-primary-d);
}

.cc-manage-link {
  display: block;
  text-align: center;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cc-secondary);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  font-family: inherit;
}

.cc-manage-link:hover {
  color: #256660;
  text-decoration: none;
}

/* Preferences modal */
#cookie-consent-modal[hidden] {
  display: none !important;
}

#cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 99992;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  pointer-events: auto;
}

.cc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 32, 46, 0.5);
}

.cc-modal-panel {
  position: relative;
  width: min(100%, 720px);
  max-width: calc(100vw - 32px);
  max-height: min(92vh, 100%);
  overflow: auto;
  background: var(--cc-bg);
  border-radius: 16px;
  padding: 28px clamp(20px, 3vw, 36px) 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

@media (min-width: 900px) {
  .cc-modal-panel {
    width: min(100%, 760px);
    padding: 32px 36px 32px;
  }
}

.cc-modal-close {
  position: absolute;
  top: 16px;
  right: clamp(16px, 3vw, 28px);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  color: #6a7680;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  outline: none;
  box-shadow: none;
}

.cc-modal-close:hover {
  color: var(--cc-black);
}

.cc-modal-close:focus,
.cc-modal-close:focus-visible {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.cc-modal-header {
  padding-right: 44px;
  margin-bottom: 12px;
}

.cc-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--cc-black);
  line-height: 1.25;
}

@media (min-width: 640px) {
  .cc-modal-title {
    font-size: 22px;
  }
}

.cc-modal-intro {
  margin: 0 0 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--cc-text);
  max-width: none;
}

.cc-pref-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cc-pref-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: var(--cc-cookie-card);
  border-radius: 12px;
  border: none;
}

.cc-pref-label {
  flex: 1;
  min-width: 0;
}

.cc-pref-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--cc-black);
  margin-bottom: 8px;
}

.cc-pref-desc {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--cc-text);
}

/* Toggle switches (banner + modal) */
.cc-switch {
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  -webkit-appearance: none;
  appearance: none;
  background: #d1d5db;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 2px;
}

.cc-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.cc-switch:checked {
  background: var(--cc-secondary);
}

.cc-switch:checked::after {
  transform: translateX(20px);
}

.cc-switch:disabled {
  cursor: not-allowed;
}

/* Essential: on, locked — same brand green, slightly muted */
.cc-switch--essential:disabled {
  opacity: 0.65;
  background: var(--cc-secondary);
}

.cc-switch--essential:disabled::after {
  transform: translateX(20px);
}

.cc-modal-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cc-modal-actions .cc-btn {
  flex: 1 1 calc(50% - 6px);
  min-width: min(100%, 200px);
  padding: 14px 20px;
}
