/* ========================================
   GDPR Cookie Consent Banner
   Copy this file + the HTML block above
   into any project to get started.
   ======================================== */

/* ---------- Layout / wrapper ---------- */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;

  background: #ffffff;
  color: #1a1a2e;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);

  /* Slide up hidden by default */
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.cookie-consent--visible {
  transform: translateY(0);
  box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.18);
}

/* ---------- Inner container ---------- */
.cookie-consent__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

/* ---------- Content text ---------- */
.cookie-consent__heading {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.cookie-consent__text {
  margin: 0;
  color: #555;
  max-width: 640px;
}

.cookie-consent__link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__link:hover {
  color: #1d4ed8;
}

/* ---------- Action buttons ---------- */
.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

/* Solid (primary) button */
.cookie-btn--solid {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.cookie-btn--solid:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* Outline button */
.cookie-btn--outline {
  background: transparent;
  color: #333;
  border-color: #ccc;
}
.cookie-btn--outline:hover {
  background: #f3f4f6;
  border-color: #999;
}

/* ---------- Customise / details panel ---------- */
.cookie-consent__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.5rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.cookie-consent__details--open {
  max-height: 400px;      /* tall enough for all checkboxes */
  padding: 1rem 1.5rem;
}

.cookie-consent__details-title {
  margin: 0 0 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Preference checkboxes ---------- */
.cookie-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.cookie-check input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #2563eb;
  cursor: pointer;
}

.cookie-check input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-check__label em {
  font-style: normal;
  color: #888;
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1rem;
  }

  .cookie-consent__text {
    max-width: 100%;
  }

  .cookie-consent__actions {
    justify-content: center;
  }

  .cookie-btn {
    flex: 1 1 auto;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent {
    transform: translateY(0);
    transition: none;
  }

  .cookie-consent--visible {
    box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.18);
  }

  .cookie-consent__details {
    transition: none;
  }
}
