/* ==========================================================================
   GDPR Cookie Consent Banner
   Styled to match the Skraafoto theme design system
   ========================================================================== */

/* Overlay — matches theme modal overlay */
.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 74, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.cc-overlay.cc-visible {
  /* Non-blocking banner: keep the page fully usable while consent is pending.
     The overlay no longer dims nor intercepts clicks. */
  opacity: 0;
  pointer-events: none;
}

/* Banner */
.cc-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 48px));
  z-index: 90; /* below search autocomplete dropdowns (z-index:100) so suggestions stay clickable */
  width: calc(100% - 48px);
  max-width: 640px;
  background: #FFFFFF;
  border: 1px solid #E8E6E1;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(27, 27, 31, 0.12), 0 8px 16px rgba(27, 27, 31, 0.06);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #2E2E33;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-banner.cc-visible {
  transform: translateX(-50%) translateY(0);
}

.cc-container {
  padding: 28px 32px;
}

/* Label — matches theme section-label / mono style */
.cc-label {
  display: inline-block;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1D4D85;
  background: #EFF6FC;
  border: 1px solid #C0DCF0;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}

/* Title — matches theme heading style */
.cc-title {
  font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  color: #1B1B1F;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

/* Body text */
.cc-text {
  margin: 0 0 20px;
  color: #71717A;
  font-size: 14px;
  line-height: 1.7;
}
.cc-text a {
  color: #1D4D85;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-text a:hover {
  color: #163A66;
  text-decoration: underline;
}

/* Category toggles */
.cc-categories {
  display: none;
  gap: 8px;
  margin-bottom: 20px;
  flex-direction: column;
}
.cc-categories.cc-expanded {
  display: flex;
}

.cc-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #F8F7F4;
  border-radius: 8px;
  border: 1px solid #E8E6E1;
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-category:hover {
  border-color: #C0DCF0;
}
.cc-category-info {
  flex: 1;
}
.cc-category-name {
  font-weight: 600;
  font-size: 14px;
  color: #1B1B1F;
}
.cc-category-desc {
  font-size: 12px;
  color: #71717A;
  margin-top: 2px;
  line-height: 1.5;
}

/* Toggle switch — uses theme blue-700 */
.cc-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 16px;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #D4D2CD;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(27, 27, 31, 0.1);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-toggle input:checked + .cc-toggle-slider {
  background: #1D4D85;
}
.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(20px);
}
.cc-toggle input:disabled + .cc-toggle-slider {
  background: #1D4D85;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Buttons — match theme button styles */
.cc-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cc-btn {
  padding: 12px 24px;
  border-radius: 6px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Primary — matches nav-cta style */
.cc-btn-accept {
  background: #1D4D85;
  color: #FFFFFF;
}
.cc-btn-accept:hover {
  background: #163A66;
  box-shadow: 0 4px 12px rgba(27, 27, 31, 0.08), 0 2px 4px rgba(27, 27, 31, 0.04);
  transform: translateY(-1px);
}

/* Secondary — matches theme light button */
.cc-btn-reject {
  background: #F2F0EB;
  color: #2E2E33;
  border: 1px solid #E8E6E1;
}
.cc-btn-reject:hover {
  background: #E8E6E1;
  border-color: #D4D2CD;
  transform: translateY(-1px);
}

/* Settings link — matches nav link style */
.cc-btn-settings {
  background: transparent;
  color: #1D4D85;
  padding: 12px 16px;
}
.cc-btn-settings:hover {
  background: #EFF6FC;
  border-radius: 6px;
}

/* Save — matches green accent */
.cc-btn-save {
  background: #2D5C3F;
  color: #FFFFFF;
  display: none;
}
.cc-btn-save:hover {
  background: #3A7550;
  box-shadow: 0 4px 12px rgba(27, 27, 31, 0.08), 0 2px 4px rgba(27, 27, 31, 0.04);
  transform: translateY(-1px);
}
.cc-categories.cc-expanded ~ .cc-buttons .cc-btn-save {
  display: inline-block;
}

/* Floating re-open button — matches theme icon button style */
.cc-reopen {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9997;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1D4D85, #163A66);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(27, 27, 31, 0.15), 0 2px 4px rgba(27, 27, 31, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
}
.cc-reopen.cc-visible {
  opacity: 1;
  pointer-events: auto;
}
.cc-reopen:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 27, 31, 0.18), 0 4px 8px rgba(27, 27, 31, 0.1);
}

/* Responsive */
@media (max-width: 600px) {
  .cc-overlay {
    /* On mobile, don't block full screen — let users scroll behind the banner */
    background: rgba(15, 42, 74, 0.4);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .cc-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(calc(100% + 16px));
    border-radius: 12px 12px 0 0;
    max-height: 60vh;
    overflow-y: auto;
  }
  .cc-banner.cc-visible {
    transform: translateY(0);
  }
  .cc-container {
    padding: 20px;
  }
  .cc-buttons {
    flex-direction: column;
  }
  .cc-btn {
    width: 100%;
    text-align: center;
    min-height: 44px;
  }
  .cc-title {
    font-size: 20px;
    margin-bottom: 6px;
  }
  .cc-text {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
  }
}
