/**
 * Cookie banner styles. Brand colors are read from CSS custom properties
 * with sensible fallbacks that match the site's palette.
 */
.cb-root {
  --cb-primary: var(--cookie-primary, #C9A96E);
  --cb-primary-text: var(--cookie-primary-text, #1C2B3A);
  --cb-bg: var(--cookie-bg, var(--cream, #F5F0E8));
  --cb-text: var(--cookie-text, var(--ink, #1A1A1A));
  --cb-text-muted: var(--cookie-text-muted, rgba(28, 43, 58, 0.72));
  --cb-border: var(--cookie-border, rgba(28, 43, 58, 0.14));
  --cb-radius: var(--cookie-radius, 8px);
  --cb-radius-sm: var(--cookie-radius-sm, 6px);
  --cb-shadow: var(--cookie-shadow, 0 -8px 30px rgba(19, 31, 42, 0.14));

  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--cb-bg);
  color: var(--cb-text);
  box-shadow: var(--cb-shadow);
  border-top: 1px solid var(--cb-border);
  font-family: var(--sans, inherit);
  font-size: 14px;
  line-height: 1.5;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cb-root.cb-open {
  transform: translateY(0);
}

.cb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cb-bar {
  justify-content: space-between;
}

.cb-message {
  margin: 0;
  flex: 1 1 280px;
  font-size: 13px;
  color: var(--cb-text);
}

.cb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.cb-actions-settings {
  justify-content: flex-end;
  width: 100%;
  margin-top: 8px;
}

.cb-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--cb-radius-sm);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--sans, inherit);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.cb-btn-primary {
  background: var(--cb-primary);
  color: var(--cb-primary-text);
}

.cb-btn-primary:hover {
  filter: brightness(0.96);
}

.cb-btn-outline {
  background: transparent;
  color: var(--cb-text);
  border-color: var(--cb-border);
}

.cb-btn-outline:hover {
  background: rgba(28, 43, 58, 0.04);
}

.cb-btn-ghost {
  background: var(--cookie-reject-bg, #6F7882);
  color: var(--cookie-reject-text, #F5F0E8);
  border-color: var(--cookie-reject-bg, #6F7882);
}

.cb-btn-ghost:hover {
  filter: brightness(1.05);
}

.cb-policy-link {
  color: var(--cb-text-muted);
  text-decoration: underline;
  font-size: 12px;
}

.cb-policy-link:hover {
  color: var(--cb-text);
}

.cb-policy-link-block {
  display: inline-block;
  margin-top: 12px;
}

.cb-settings {
  flex-direction: column;
  align-items: stretch;
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.cb-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--cb-text);
}

.cb-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
}

.cb-row-text {
  flex: 1;
}

.cb-row-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--cb-text);
}

.cb-row-desc {
  font-size: 12px;
  color: var(--cb-text-muted);
  margin-top: 2px;
}

.cb-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}

.cb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cb-slider {
  position: absolute;
  inset: 0;
  background: rgba(28, 43, 58, 0.18);
  border-radius: 22px;
  transition: background 0.2s ease;
}

.cb-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cb-switch input:checked + .cb-slider {
  background: var(--cb-primary);
}

.cb-switch input:checked + .cb-slider::before {
  transform: translateX(18px);
}

.cb-switch input:disabled + .cb-slider {
  opacity: 0.7;
  cursor: not-allowed;
}

.cb-reopen {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9998;
  background: var(--cookie-bg, var(--cream, #F5F0E8));
  color: var(--cookie-text-muted, rgba(28, 43, 58, 0.72));
  border: 1px solid var(--cookie-border, rgba(28, 43, 58, 0.14));
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--sans, inherit);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(19, 31, 42, 0.08);
  opacity: 0.92;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cb-reopen:hover {
  opacity: 1;
  color: var(--cb-text);
  border-color: rgba(28, 43, 58, 0.24);
}

@media (max-width: 640px) {
  .cb-inner {
    padding: 12px 14px;
  }

  .cb-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .cb-message {
    flex: 1 1 auto;
  }

  .cb-actions {
    justify-content: stretch;
  }

  .cb-actions .cb-btn,
  .cb-actions-settings .cb-btn {
    flex: 1 1 100%;
    min-width: 0;
  }
}
