/* ── Cookie Consent Banner ── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: inherit;
  animation: cookie-slide-up 0.3s ease-out;
}

@keyframes cookie-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

#cookie-banner.cookie-hidden {
  display: none;
}

.cookie-text {
  flex: 1;
  min-width: 220px;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

.cookie-text a {
  color: #2563eb;
  text-decoration: underline;
}

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

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}

.cookie-btn-reject {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.cookie-btn-reject:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #334155;
}

.cookie-btn-accept {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.cookie-btn-accept:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* ── Cookie Settings Modal ── */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#cookie-modal.cookie-hidden {
  display: none;
}

.cookie-modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 1.75rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
}

.cookie-modal-desc {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0 0 1.25rem;
  line-height: 1.55;
}

.cookie-category {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
}

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

.cookie-category-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.cookie-category-desc {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.35rem 0 0;
  line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

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

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #2563eb;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
  background: #93c5fd;
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  #cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .cookie-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
