/* ==============================================
   EventFlow Cookie Consent
   Dark glassmorphism theme — matches site design
   =============================================== */

/* ---- Banner (bottom bar) ---- */
#ef-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  background: rgba(15, 23, 42, 0.97);
  border-top: 1px solid rgba(99, 102, 241, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  padding: 18px 24px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif;
}

#ef-cookie-banner.ef-visible {
  transform: translateY(0);
}

.ef-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ef-banner-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}

.ef-banner-text {
  flex: 1 1 300px;
  min-width: 0;
}

.ef-banner-text p {
  margin: 0;
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.ef-banner-text a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ef-banner-text a:hover {
  color: #c1ff72;
}

.ef-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ---- Buttons ---- */
.ef-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.ef-btn-accept-all {
  background: #6366f1;
  color: #fff;
}

.ef-btn-accept-all:hover {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.ef-btn-necessary {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.ef-btn-necessary:hover {
  border-color: rgba(148, 163, 184, 0.6);
  color: #cbd5e1;
}

.ef-btn-manage {
  background: transparent;
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.ef-btn-manage:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
}

/* ---- Modal Overlay ---- */
#ef-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 99995;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-family: 'Inter', sans-serif;
}

#ef-cookie-modal.ef-visible {
  opacity: 1;
  pointer-events: all;
}

.ef-modal-box {
  background: #1e293b;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: efModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ef-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ef-modal-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ef-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.ef-modal-close:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.ef-modal-body {
  padding: 18px 24px;
}

.ef-modal-intro {
  font-size: 0.84rem;
  color: #94a3b8;
  margin: 0 0 20px;
  line-height: 1.55;
}

.ef-modal-intro a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Category Cards ---- */
.ef-category {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.ef-category:last-of-type {
  margin-bottom: 0;
}

.ef-category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.ef-category-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ef-badge-required {
  font-size: 0.68rem;
  font-weight: 600;
  color: #c1ff72;
  background: rgba(193, 255, 114, 0.12);
  border: 1px solid rgba(193, 255, 114, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

/* ---- Toggle Switch ---- */
.ef-toggle {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ef-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ef-toggle-label {
  display: block;
  width: 42px;
  height: 24px;
  background: #334155;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s;
  position: relative;
}

.ef-toggle-label::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ef-toggle input:checked + .ef-toggle-label {
  background: #6366f1;
}

.ef-toggle input:checked + .ef-toggle-label::after {
  transform: translateX(18px);
}

.ef-toggle input:disabled + .ef-toggle-label {
  background: rgba(193, 255, 114, 0.25);
  cursor: not-allowed;
}

.ef-toggle input:disabled:checked + .ef-toggle-label {
  background: rgba(193, 255, 114, 0.4);
}

.ef-toggle input:disabled + .ef-toggle-label::after {
  background: #c1ff72;
}

/* ---- Modal Footer ---- */
.ef-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
}

.ef-btn-save {
  background: #c1ff72;
  color: #0f172a;
  font-weight: 700;
}

.ef-btn-save:hover {
  background: #a8f050;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(193, 255, 114, 0.3);
}

/* ---- Scrollbar inside modal ---- */
.ef-modal-box::-webkit-scrollbar {
  width: 5px;
}

.ef-modal-box::-webkit-scrollbar-track {
  background: transparent;
}

.ef-modal-box::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  #ef-cookie-banner {
    padding: 14px 16px;
  }

  .ef-banner-inner {
    gap: 14px;
  }

  .ef-banner-actions {
    width: 100%;
    justify-content: stretch;
  }

  .ef-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 10px;
    font-size: 0.78rem;
  }

  .ef-modal-header,
  .ef-modal-body,
  .ef-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ef-modal-footer {
    flex-direction: column;
  }

  .ef-modal-footer .ef-btn {
    width: 100%;
  }
}
