/* ==========================================================
   KEMPSTON PILOTS — Cookie Consent Banner
   GDPR / ePrivacy / Google AdSense EU User Consent-compatible
   ========================================================== */

#kp-cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 1040px;
  margin: 0 auto;
  background: rgba(10, 15, 30, 0.97);
  color: #e2e8f0;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 158, 11, 0.08);
  font-family: 'Rajdhani', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  z-index: 9999;
  backdrop-filter: blur(12px);
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

#kp-cookie-banner.kp-visible {
  transform: translateY(0);
  opacity: 1;
}

#kp-cookie-banner .kp-cc-body {
  font-size: 14.5px;
  line-height: 1.55;
  color: #cbd5e1;
}

#kp-cookie-banner .kp-cc-body strong {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: #f59e0b;
  text-transform: uppercase;
  margin-bottom: 6px;
}

#kp-cookie-banner .kp-cc-body a {
  color: #f59e0b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#kp-cookie-banner .kp-cc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#kp-cookie-banner button {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

#kp-cookie-banner button:hover {
  transform: translateY(-1px);
}

#kp-cookie-banner .kp-cc-accept {
  background: #f59e0b;
  color: #0a0f1e;
  border-color: #f59e0b;
}

#kp-cookie-banner .kp-cc-accept:hover {
  background: #fbbf24;
  border-color: #fbbf24;
}

#kp-cookie-banner .kp-cc-reject {
  background: transparent;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.25);
}

#kp-cookie-banner .kp-cc-reject:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #f59e0b;
}

#kp-cookie-banner .kp-cc-manage {
  background: transparent;
  color: #94a3b8;
  border-color: transparent;
  padding: 11px 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#kp-cookie-banner .kp-cc-manage:hover {
  color: #f59e0b;
}

/* ---- Preferences modal ---- */
#kp-cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.75);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

#kp-cookie-modal.kp-visible {
  display: flex;
}

#kp-cookie-modal .kp-modal-card {
  width: 100%;
  max-width: 560px;
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 32px;
  color: #e2e8f0;
  font-family: 'Rajdhani', sans-serif;
  max-height: 90vh;
  overflow-y: auto;
}

#kp-cookie-modal h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  color: #f59e0b;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#kp-cookie-modal p {
  font-size: 14.5px;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 16px;
}

#kp-cookie-modal .kp-pref-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#kp-cookie-modal .kp-pref-row:first-of-type {
  border-top: none;
}

#kp-cookie-modal .kp-pref-row h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

#kp-cookie-modal .kp-pref-row p {
  font-size: 13px;
  margin: 0;
  color: #94a3b8;
}

#kp-cookie-modal .kp-pref-row .kp-locked {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #4ade80;
  text-transform: uppercase;
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(74, 222, 128, 0.08);
  flex-shrink: 0;
}

/* Toggle switch */
.kp-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.kp-switch input { opacity: 0; width: 0; height: 0; }
.kp-switch .kp-slider {
  position: absolute; cursor: pointer;
  inset: 0;
  background: #334155;
  border-radius: 24px;
  transition: background 0.2s;
}
.kp-switch .kp-slider::before {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.kp-switch input:checked + .kp-slider { background: #f59e0b; }
.kp-switch input:checked + .kp-slider::before { transform: translateX(20px); }

#kp-cookie-modal .kp-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  flex-wrap: wrap;
}

#kp-cookie-modal button {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}

#kp-cookie-modal .kp-save {
  background: #f59e0b;
  color: #0a0f1e;
  border-color: #f59e0b;
}
#kp-cookie-modal .kp-save:hover { background: #fbbf24; border-color: #fbbf24; }

#kp-cookie-modal .kp-cancel {
  background: transparent;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.25);
}
#kp-cookie-modal .kp-cancel:hover { border-color: rgba(245, 158, 11, 0.5); color: #f59e0b; }

/* Floating "Manage cookies" reopen pill (after choice made) */
#kp-cookie-reopen {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9998;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #cbd5e1;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: none;
  transition: color 0.15s, border-color 0.15s;
  backdrop-filter: blur(8px);
  text-transform: uppercase;
}
#kp-cookie-reopen:hover { color: #f59e0b; border-color: rgba(245, 158, 11, 0.55); }
#kp-cookie-reopen.kp-visible { display: inline-flex; align-items: center; gap: 6px; }

/* Responsive */
@media (max-width: 720px) {
  #kp-cookie-banner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
  #kp-cookie-banner .kp-cc-actions { justify-content: stretch; }
  #kp-cookie-banner .kp-cc-actions button { flex: 1; }
}
