/* ═══════════════ COOKIE CONSENT SYSTEM ═══════════════ */

/* ── BANNER ── */
#wtn-cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #0c1220 0%, #111a2e 100%);
  border-top: 1px solid #1e2d4a;
  box-shadow: 0 -8px 40px rgba(0,0,0,.6), 0 -1px 0 rgba(0,229,255,.15);
  padding: 0;
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.16,1,.3,1);
  font-family: 'Inter', sans-serif;
}
#wtn-cookie-banner.show { transform: translateY(0); }
#wtn-cookie-banner.hide { transform: translateY(110%); transition: transform .35s ease-in; }

.wtn-cookie-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.wtn-cookie-icon { font-size: 28px; flex-shrink: 0; }

.wtn-cookie-text { flex: 1; min-width: 260px; }

.wtn-cookie-text strong {
  display: block;
  color: #e8edf5;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -.2px;
}

.wtn-cookie-text p {
  color: #8899b4;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.wtn-cookie-text a {
  color: #00e5ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,229,255,.3);
  transition: border-color .2s;
}
.wtn-cookie-text a:hover { border-color: #00e5ff; }

.wtn-cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}

/* ── BUTTONS ── */
.wtn-btn-accept-all {
  padding: 11px 22px;
  background: #00e5ff;
  color: #000;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.wtn-btn-accept-all:hover {
  background: #33ecff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,229,255,.35);
}

.wtn-btn-essential {
  padding: 11px 18px;
  background: transparent;
  color: #8899b4;
  border: 1px solid #1e2d4a;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.wtn-btn-essential:hover { border-color: #8899b4; color: #e8edf5; }

.wtn-btn-settings {
  padding: 11px 18px;
  background: transparent;
  color: #8899b4;
  border: 1px solid #1e2d4a;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.wtn-btn-settings:hover { border-color: #7c3aed; color: #7c3aed; }

/* ── MODAL ── */
#wtn-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
#wtn-cookie-modal.show { opacity: 1; visibility: visible; }

.wtn-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,8,16,.85);
  backdrop-filter: blur(8px);
}

.wtn-modal-box {
  position: relative;
  background: #0c1220;
  border: 1px solid #1e2d4a;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(0,229,255,.08);
  font-family: 'Inter', sans-serif;
}

.wtn-modal-box::-webkit-scrollbar { width: 4px; }
.wtn-modal-box::-webkit-scrollbar-track { background: #050810; }
.wtn-modal-box::-webkit-scrollbar-thumb { background: #1e2d4a; border-radius: 2px; }

.wtn-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #1e2d4a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #0c1220;
  z-index: 2;
}

.wtn-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #e8edf5;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wtn-modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid #1e2d4a;
  color: #8899b4;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  font-family: 'Inter', sans-serif;
}
.wtn-modal-close:hover { border-color: #ff4060; color: #ff4060; }

.wtn-modal-body { padding: 20px 24px; }
.wtn-modal-body p {
  color: #8899b4;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.wtn-modal-body p a { color: #00e5ff; text-decoration: none; }
.wtn-modal-body p a:hover { text-decoration: underline; }

/* ── CATEGORY CARDS ── */
.wtn-cookie-cat {
  background: #111a2e;
  border: 1px solid #1e2d4a;
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.wtn-cookie-cat:hover { border-color: rgba(0,229,255,.2); }

.wtn-cookie-cat-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 12px;
}

.wtn-cat-info { flex: 1; min-width: 0; }

.wtn-cat-name {
  font-size: 14px;
  font-weight: 700;
  color: #e8edf5;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wtn-cat-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  letter-spacing: .5px;
}
.wtn-badge-required  { background: rgba(6,255,165,.12); color: #06ffa5; }
.wtn-badge-optional  { background: rgba(0,229,255,.10); color: #00e5ff; }

.wtn-cat-desc { font-size: 12px; color: #8899b4; line-height: 1.5; }

/* ── TOGGLE SWITCH ── */
.wtn-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.wtn-toggle input { opacity: 0; width: 0; height: 0; }

.wtn-toggle-slider {
  position: absolute;
  inset: 0;
  background: #1e2d4a;
  border-radius: 12px;
  cursor: pointer;
  transition: background .25s;
}
.wtn-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #8899b4;
  border-radius: 50%;
  transition: transform .25s, background .25s;
}
.wtn-toggle input:checked + .wtn-toggle-slider { background: rgba(0,229,255,.2); border: 1px solid rgba(0,229,255,.4); }
.wtn-toggle input:checked + .wtn-toggle-slider::before { transform: translateX(20px); background: #00e5ff; }
.wtn-toggle input:disabled + .wtn-toggle-slider { opacity: .5; cursor: not-allowed; }
.wtn-toggle input:disabled + .wtn-toggle-slider::before { background: #06ffa5; transform: translateX(20px); }

/* ── DETAILS EXPAND ── */
.wtn-cat-details {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}
.wtn-cat-details.open { max-height: 300px; padding: 0 18px 16px; }

.wtn-cookie-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(30,45,74,.5);
  font-size: 12px;
}
.wtn-cookie-item:first-child { border-top: none; }

.wtn-ci-name     { font-family: 'JetBrains Mono', monospace; color: #00e5ff; font-size: 11px; }
.wtn-ci-purpose  { color: #8899b4; }
.wtn-ci-duration { color: #ffd166; font-family: 'JetBrains Mono', monospace; font-size: 11px; }

.wtn-expand-btn {
  background: transparent;
  border: none;
  color: #8899b4;
  font-size: 11px;
  cursor: pointer;
  padding: 6px 0 0;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color .2s;
}
.wtn-expand-btn:hover { color: #00e5ff; }

.wtn-expand-icon { transition: transform .3s; display: inline-block; }
.wtn-expand-icon.open { transform: rotate(180deg); }

/* ── MODAL FOOTER ── */
.wtn-modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid #1e2d4a;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  background: #0c1220;
}
.wtn-modal-footer .wtn-btn-accept-all { flex: 1; max-width: 200px; text-align: center; }

.wtn-modal-footer .wtn-btn-save-pref {
  padding: 11px 20px;
  background: transparent;
  border: 1px solid #00e5ff;
  color: #00e5ff;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.wtn-modal-footer .wtn-btn-save-pref:hover { background: rgba(0,229,255,.08); }

/* ── FAB (floating cookie button) ── */
#wtn-cookie-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #0c1220;
  border: 1px solid #1e2d4a;
  color: #8899b4;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  font-family: 'Inter', sans-serif;
}
#wtn-cookie-fab:hover { border-color: #00e5ff; color: #00e5ff; transform: scale(1.08); }
#wtn-cookie-fab.visible { display: flex; }

/* ── TOAST ── */
.wtn-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99998;
  background: #0c1220;
  border: 1px solid rgba(6,255,165,.3);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e8edf5;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  transform: translateX(calc(100% + 32px));
  transition: transform .4s cubic-bezier(.16,1,.3,1);
  font-family: 'Inter', sans-serif;
}
.wtn-toast.show { transform: translateX(0); }
.wtn-toast-icon { font-size: 18px; }
.wtn-toast strong { color: #06ffa5; }

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .wtn-cookie-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .wtn-cookie-actions { width: 100%; }
  .wtn-btn-accept-all,
  .wtn-btn-essential,
  .wtn-btn-settings { flex: 1; text-align: center; padding: 12px 10px; font-size: 13px; }
  .wtn-modal-box { border-radius: 16px 16px 0 0; max-height: 85vh; }
  #wtn-cookie-modal { align-items: flex-end; padding: 0; }
  .wtn-modal-footer .wtn-btn-accept-all { max-width: none; }
  .wtn-cookie-item { grid-template-columns: 1fr 1fr; }
  .wtn-ci-duration { grid-column: 1 / -1; }
}
