@charset "utf-8";
/* CSS Document */

/* --- Utility --- */
.cookie-sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/* Generic hide via hidden attribute */
[hidden] {
  display: none !important;
}

/* ========== FLOATING COOKIE BUTTON ========== */
.cookie-floating-button {
  position: fixed;
  left: 20px;
  bottom: 30px; /* BELOW accessibility icon, and will sit behind banner */
  z-index: 500000;

  width: 58px;
  height: 58px;
  border-radius: 50%;

  background: linear-gradient(96deg, #326cff, #0048ff) !important;
  border: 3px solid #ffffff !important;
  outline: 5px solid #0048ff !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 30px;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;

  box-shadow:
    0 5px 15px #252c6126,
    0 2px 4px #5d649433;

  transition: transform .2s ease;
}

.cookie-floating-button:hover,
.cookie-floating-button:focus-visible {
  transform: scale(1.05);
  outline-offset: 2px;
}

.cookie-floating-button svg {
  display: block;
}

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
  .cookie-floating-button {
    width: 42px;
    height: 42px;
    font-size: 24px;
    bottom: 24px;
  }
}

/* ========== COOKIE MODAL (MANAGER) ========== */

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.cookie-modal {
  background: #ffffff;
  color: #1c1c1c;
  max-width: 540px;
  width: 90%;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 1.75rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header */
.cookie-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #002c4e;
}

.cookie-modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #444;
  padding: 0.25rem;
}

.cookie-modal-close:hover,
.cookie-modal-close:focus-visible {
  color: #000;
  outline: 2px solid #00a899;
  outline-offset: 2px;
}

.cookie-modal-intro {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* Body / categories */
.cookie-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cookie-category {
  padding: 1rem 0.75rem;
  border-radius: 12px;
  background: #f5f7fa;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.cookie-category-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #002c4e;
}

.cookie-category-description {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: #444;
}

.cookie-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #002c4e;
}

.cookie-tag-essential {
  background: #002c4e;
  color: #ffffff;
}

/* Toggle control */
.cookie-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.cookie-toggle span:first-child {
  flex: 1;
}

/* Hide default checkbox */
.cookie-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Custom slider */
.cookie-toggle-slider {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c7ccd6;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

/* Checked */
.cookie-toggle input[type="checkbox"]:checked + .cookie-toggle-slider {
  background: #00a899;
}

.cookie-toggle input[type="checkbox"]:checked + .cookie-toggle-slider::before {
  transform: translateX(18px);
}

/* Disabled */
.cookie-toggle input[type="checkbox"]:disabled + .cookie-toggle-slider {
  background: #9aa3b2;
  opacity: 0.85;
}

/* Focus outline on label when checkbox receives focus */
.cookie-toggle input[type="checkbox"]:focus-visible + .cookie-toggle-slider,
.cookie-toggle input[type="checkbox"]:focus-visible ~ span {
  outline: 2px solid #002c4e;
  outline-offset: 3px;
}

/* Modal actions */
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* Policy link inside modal */
.cookie-policy-link {
  margin-top: 0.25rem;
  font-size: 0.86rem;
}

.cookie-policy-link a {
  color: #002c4e;
  text-decoration: underline;
}

.cookie-policy-link a:hover,
.cookie-policy-link a:focus-visible {
  color: #00a899;
}

/* Small screens for modal */
@media (max-width: 480px) {
  .cookie-modal {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .cookie-category {
    padding: 0.85rem 0.75rem;
  }

  .cookie-modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .cookie-modal-actions .cookie-btn {
    width: 100%;
    text-align: center;
  }
}

/* ========== SHARED BUTTON STYLES (modal + banner) ========== */

.cookie-btn {
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 600;
}

.cookie-btn-primary {
  background: #002c4e;
  color: #ffffff;
  border-color: #002c4e;
}

.cookie-btn-primary:hover,
.cookie-btn-primary:focus-visible {
  background: #003b72;
  border-color: #00a899;
  outline: none;
}

.cookie-btn-secondary {
  background: #ffffff;
  color: #002c4e;
  border-color: #002c4e;
}

.cookie-btn-secondary:hover,
.cookie-btn-secondary:focus-visible {
  background: #f0f3f8;
  border-color: #00a899;
  outline: none;
}

/* Tertiary button (e.g., Manage) */
.cookie-btn-tertiary {
  background: transparent;
  color: #ffffff;
  border-color: transparent;
  text-decoration: underline;
}

/* ========== CONSENT BANNER ========== */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500001; /* above floating buttons */

  /* More attention-grabbing, but still brand-compatible */
  background: linear-gradient(90deg, #f9b234, #ffca3a);
  color: #1c1c1c;

  padding: 1rem 1.5rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3);
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cookie-banner-text {
  margin: 0;
  font-size: 0.9rem;
  flex: 1 1 260px;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

/* Close “X” */
.cookie-banner-close {
  position: absolute;
  top: 0.35rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #1c1c1c;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

/* Clear-all test helper */
.cookie-banner-clear {
  display: inline-block;
  margin-top: 0.35rem;
  background: transparent;
  border: none;
  color: #b30000;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}

/* You can hide this in production like:
   body.production .cookie-banner-clear { display: none; }
*/

/* Policy link (banner) */
.cookie-banner-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.86rem;
  color: #1c1c1c;
  text-decoration: underline;
}

.cookie-banner-link:hover,
.cookie-banner-link:focus-visible {
  color: #002c4e;
}

/* Mobile layout */
@media (max-width: 600px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
