/**
 * ACNHS Cookie Consent — Gold / Navy Design System
 */

/* ── Banner ──────────────────────────────────────────────────────── */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(4, 17, 31, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(201, 168, 76, 0.28);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5), 0 -1px 0 rgba(201, 168, 76, 0.1);
  z-index: 10000;
  display: none;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.35s ease, transform 0.35s ease;
  color: #f0ece3;
  font-family: 'Inter', sans-serif;
}

#cookie-consent-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.6), transparent);
}

#cookie-consent-banner.show {
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* ── Banner Text ─────────────────────────────────────────────────── */
.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text h3 {
  margin: 0 0 6px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: #e2cc92;
  letter-spacing: 0.3px;
}

.cookie-banner-text p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.65;
  color: #c8bfb2;
}

.cookie-banner-text a {
  color: #d4b56a;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: color 0.2s;
}

.cookie-banner-text a:hover {
  color: #e2cc92;
  text-decoration: underline;
}

/* ── Banner Buttons ──────────────────────────────────────────────── */
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-banner-actions button {
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.btn-preferences {
  background: transparent;
  color: #8a8070;
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.btn-preferences:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.4);
  color: #c8bfb2;
}

.btn-reject {
  background: transparent;
  color: #c8bfb2;
  border: 1px solid rgba(201, 168, 76, 0.28);
}

.btn-reject:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.5);
  color: #e2cc92;
}

.btn-accept {
  background: linear-gradient(135deg, #c9a84c, #d4b56a);
  color: #04111f;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.28);
}

.btn-accept:hover {
  background: linear-gradient(135deg, #d4b56a, #e2cc92);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(201, 168, 76, 0.40);
}

/* ── Preferences Modal Overlay ───────────────────────────────────── */
#cookie-preferences-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#cookie-preferences-modal.show {
  opacity: 1;
}

/* ── Modal Card ──────────────────────────────────────────────────── */
.cookie-modal-content {
  background: #071b30;
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 168, 76, 0.08);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s ease;
  font-family: 'Inter', sans-serif;
  color: #f0ece3;
  position: relative;
}

.cookie-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.6), transparent);
  border-radius: 16px 16px 0 0;
}

#cookie-preferences-modal.show .cookie-modal-content {
  transform: scale(1) translateY(0);
}

/* ── Modal Header ────────────────────────────────────────────────── */
.cookie-modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h2 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #e2cc92;
  letter-spacing: 0.2px;
}

.modal-close {
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: #8a8070;
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.4);
  color: #d4b56a;
}

/* ── Modal Body ──────────────────────────────────────────────────── */
.cookie-modal-body {
  padding: 24px 28px;
}

.cookie-modal-body > p {
  margin: 0 0 20px;
  color: #c8bfb2;
  font-size: 14px;
  line-height: 1.7;
}

/* ── Cookie Category Cards ───────────────────────────────────────── */
.cookie-category {
  margin-bottom: 12px;
  padding: 16px 18px;
  background: rgba(4, 17, 31, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(201, 168, 76, 0.15);
  transition: all 0.2s ease;
}

.cookie-category:hover {
  background: rgba(4, 17, 31, 0.7);
  border-color: rgba(201, 168, 76, 0.28);
}

.cookie-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.cookie-category-header input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #c9a84c;
  flex-shrink: 0;
}

.cookie-category-header input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.cookie-category-header label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #e2cc92;
  margin: 0;
  flex: 1;
}

.cookie-category-header input[type="checkbox"]:disabled + label {
  cursor: not-allowed;
  color: #8a8070;
}

.required-badge {
  background: rgba(201, 168, 76, 0.15);
  color: #d4b56a;
  border: 1px solid rgba(201, 168, 76, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cookie-category-desc {
  margin: 0;
  font-size: 12px;
  color: #8a8070;
  line-height: 1.6;
  padding-left: 30px;
}

/* ── Modal Footer ────────────────────────────────────────────────── */
.cookie-modal-footer {
  padding: 18px 28px 24px;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cookie-modal-footer button {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.btn-save {
  background: transparent;
  color: #d4b56a;
  border: 1px solid rgba(201, 168, 76, 0.35);
}

.btn-save:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.55);
  color: #e2cc92;
}

.btn-accept-all {
  background: linear-gradient(135deg, #c9a84c, #d4b56a);
  color: #04111f;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.28);
}

.btn-accept-all:hover {
  background: linear-gradient(135deg, #d4b56a, #e2cc92);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(201, 168, 76, 0.4);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cookie-banner-content {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cookie-banner-text {
    min-width: auto;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions button {
    flex: 1;
    text-align: center;
  }

  .cookie-modal-content {
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: calc(100vh - 2rem);
  }

  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cookie-modal-footer {
    flex-direction: column;
  }

  .cookie-modal-footer button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cookie-banner-text h3 {
    font-size: 14px;
  }

  .cookie-banner-text p {
    font-size: 12px;
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

  .cookie-category-desc {
    padding-left: 0;
    margin-top: 6px;
  }
}

/* ── Accessibility ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #cookie-consent-banner,
  #cookie-preferences-modal,
  .cookie-modal-content,
  button {
    transition: none;
  }
}

/* ── Print ───────────────────────────────────────────────────────── */
@media print {
  #cookie-consent-banner,
  #cookie-preferences-modal {
    display: none !important;
  }
}
