/* ------------------------------------------------------------------
   Cookie consent banner styles - extracted from site.css so the
   _CookieConsent partial carries its own stylesheet: standalone pages
   (Layout = null) that don't load site.css still render a styled
   banner. Loaded by Shared/_CookieConsent.cshtml - don't link it from
   pages directly. Includes a local .visually-hidden copy for pages
   without site.css (site.css keeps its own for other components).
-------------------------------------------------------------------*/

/* ------------------------------------------------------------------
   Cookie Consent Banner (bottom-anchored, non-blocking - EU style)
-------------------------------------------------------------------*/
/* Container is fixed at the bottom of the viewport. It does NOT cover
   the page or capture clicks outside the card, so users can keep
   reading and clicking the rest of the site while the banner is up.
   The banner itself persists until the user picks Accept / Reject /
   Save preferences. */
.cookie-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  padding: 1rem;
  pointer-events: none; /* let clicks pass through the empty space */
  animation: cookieFadeIn 0.3s ease;
}

@keyframes cookieFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cookieSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* The card itself is the only interactive surface. */
.cookie-modal {
  pointer-events: auto;
  background: var(--nf-surface, #fff);
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 24px 80px rgba(42, 14, 92, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  text-align: left;
  animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.cookie-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--nf-accent-pink, #e91e8c), var(--nf-accent-orange, #ff6b35));
  color: #fff;
  flex-shrink: 0;
  margin: 0;
}

.cookie-modal-icon svg {
  width: 22px;
  height: 22px;
}

.cookie-modal-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nf-text, #1a1a2e);
  margin: 0;
}

.cookie-modal-body {
  margin-bottom: 1rem;
}

.cookie-modal-body p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--nf-text-muted, #6c757d);
  margin: 0;
}

.cookie-modal-body a {
  color: var(--nf-accent-pink, #e91e8c);
  text-decoration: underline;
}

/* Buttons sit horizontally on a typical EU bottom banner; collapse to
   a stack on narrow screens via the @media block below. */
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Cookie buttons */
.cookie-btn {
  flex: 0 0 auto;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.cookie-btn-primary {
  background: linear-gradient(135deg, var(--nf-accent-pink, #e91e8c), var(--nf-accent-orange, #ff6b35));
  color: #fff;
}

.cookie-btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.cookie-btn-secondary {
  background: transparent;
  color: var(--nf-text-muted, #6c757d);
  font-weight: 500;
}

.cookie-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--nf-text, #1a1a2e);
}

.cookie-btn-outline {
  background: transparent;
  color: var(--nf-primary, #6c3baa);
  border: 1px solid var(--nf-primary, #6c3baa);
}

.cookie-btn-outline:hover {
  background: var(--nf-primary, #6c3baa);
  color: #fff;
}

/* Preferences panel */
.cookie-preferences {
  border-top: 1px solid var(--nf-border, #e9ecef);
  margin-top: 1.5rem;
  padding-top: 1rem;
  text-align: left;
}

.cookie-preferences-content {
  padding: 0;
}

.cookie-category {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--nf-border, #e9ecef);
}

.cookie-category:last-of-type {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cookie-category-info h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nf-text, #1a1a2e);
}

.cookie-category-info p {
  margin: 0;
  font-size: 0.825rem;
  color: var(--nf-text-muted, #6c757d);
  line-height: 1.4;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: background-color 0.25s ease;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: var(--nf-primary, #6c3baa);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(20px);
}

.cookie-toggle-always-on {
  background-color: var(--nf-primary, #6c3baa);
  opacity: 0.6;
}

.cookie-toggle-always-on::before {
  transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  cursor: not-allowed;
}

.cookie-preferences-actions {
  padding-top: 0.75rem;
  text-align: right;
}

/* Visually hidden utility for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .cookie-overlay {
    padding: 0.5rem;
  }

  .cookie-modal {
    padding: 1.25rem 1rem 1rem;
    border-radius: 14px;
  }

  .cookie-modal-header h2 {
    font-size: 1rem;
  }

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

  .cookie-btn {
    width: 100%;
  }

  .cookie-category-header {
    flex-direction: row;
  }
}
