/* ============================================================
   Drip Dry SEO — Compliance Styles
   Cookie Banner, GDPR, ADA Accessibility
   ============================================================ */

/* Skip to main content link (ADA) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 99999;
  background: var(--color-primary, #1e4db7);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: top 0.2s ease;
  outline: none;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

/* Focus visible for keyboard navigation */
.keyboard-nav *:focus {
  outline: 3px solid #1e4db7 !important;
  outline-offset: 3px !important;
}
.keyboard-nav *:focus:not(:focus-visible) {
  outline: none !important;
}

/* ============================================================
   Cookie Banner
   ============================================================ */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  background: #0d1b3e;
  border-top: 3px solid #f97316;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}

.cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  min-width: 260px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
}

.cookie-banner__link {
  color: #f97316;
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}
.cookie-btn:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}
.cookie-btn:active {
  transform: scale(0.97);
}

.cookie-btn--accept {
  background: #f97316;
  color: #fff;
}
.cookie-btn--accept:hover {
  background: #ea6c0a;
}

.cookie-btn--essential {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.cookie-btn--essential:hover {
  background: rgba(255,255,255,0.25);
}

.cookie-btn--manage {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
}
.cookie-btn--manage:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

/* Cookie Preferences Panel */
.cookie-preferences {
  max-width: 1200px;
  margin: 1.25rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.cookie-preferences__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.cookie-pref-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.cookie-pref-item:last-of-type {
  border-bottom: none;
}
.cookie-pref-item strong {
  display: block;
  font-size: 0.9375rem;
  color: #fff;
  margin-bottom: 0.25rem;
}
.cookie-pref-item p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
  line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle-label {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.cookie-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 26px;
  transition: background 0.2s ease;
}
.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.cookie-checkbox:checked + .cookie-toggle-slider {
  background: #f97316;
}
.cookie-checkbox:checked + .cookie-toggle-slider::before {
  transform: translateX(22px);
}
.cookie-checkbox:focus-visible + .cookie-toggle-slider {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

.cookie-toggle--always-on {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74,222,128,0.15);
  border: 1px solid rgba(74,222,128,0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* ============================================================
   GDPR Consent Checkbox in Forms
   ============================================================ */
.form-group--gdpr {
  margin-bottom: 1.25rem;
}
.gdpr-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-mid, #4b5563);
  cursor: pointer;
  line-height: 1.6;
}
.gdpr-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.2em;
  accent-color: var(--color-primary, #1e4db7);
  cursor: pointer;
}
.gdpr-label a {
  color: var(--color-primary, #1e4db7);
  text-decoration: underline;
}

/* ============================================================
   ADA Accessibility — High Contrast Mode Support
   ============================================================ */
@media (forced-colors: active) {
  .cookie-btn {
    border: 2px solid ButtonText;
  }
  .cookie-toggle-slider {
    border: 2px solid ButtonText;
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-banner__actions {
    width: 100%;
  }
  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}
