/* ============================================================
   BUILDSBYBUCHANAN — COOKIE CONSENT v1
   Starlink-inspired bottom banner + settings modal
   ============================================================ */

/* ── BANNER ── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: rgba(8, 10, 12, 0.97);
  border-top: 1px solid var(--border-strong, #262c34);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 24px;
  display: none;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease;
}

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

@media (max-width: 768px) {
  #cookie-banner {
    bottom: 0;
    padding: 16px 16px 20px;
  }
}

.ck-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 760px) {
  .ck-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

.ck-text { flex: 1; min-width: 0; }

.ck-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-strong, #f0f4f8);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.ck-desc {
  font-size: 12.5px;
  color: var(--text-muted, #7a8799);
  margin: 0;
  line-height: 1.55;
  max-width: 620px;
}

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

@media (max-width: 760px) {
  .ck-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ── SHARED BUTTON STYLES ── */
.ck-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.14s;
  line-height: 1;
}

.ck-btn:active { transform: scale(0.97); }

.ck-btn-accept {
  background: var(--accent, #8abf3c);
  color: #0a1500;
}
.ck-btn-accept:hover { background: var(--accent-hover, #9ed04a); }

.ck-btn-settings {
  background: transparent;
  color: var(--text-muted, #7a8799);
  border: 1px solid var(--border-strong, #262c34);
}
.ck-btn-settings:hover {
  color: var(--text-strong, #f0f4f8);
  border-color: var(--border-strong, #3a4450);
  background: var(--surface-2, #181b1f);
}

/* ── SETTINGS MODAL OVERLAY ── */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9995;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (min-width: 600px) {
  #cookie-modal {
    align-items: center;
    padding: 24px;
  }
}

#cookie-modal.open {
  opacity: 1;
}

#cookie-modal.open .ck-modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ── MODAL BOX ── */
.ck-modal-box {
  background: var(--surface, #111417);
  border: 1px solid var(--border-strong, #262c34);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 520px;
  padding: 28px 24px 24px;
  position: relative;
  transform: translateY(40px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s ease;
  max-height: 92vh;
  overflow-y: auto;
}

@media (min-width: 600px) {
  .ck-modal-box {
    border-radius: 16px;
    transform: translateY(24px) scale(0.98);
  }
}

/* ── MODAL CLOSE ── */
.ck-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid var(--border-strong, #262c34);
  color: var(--text-muted, #7a8799);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ck-modal-close:hover {
  color: var(--text-strong, #f0f4f8);
  border-color: var(--border-strong, #3a4450);
  background: var(--surface-2, #181b1f);
}

/* ── MODAL HEADER ── */
.ck-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding-right: 32px;
}

.ck-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft, rgba(138,191,60,.09));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #8abf3c);
  flex-shrink: 0;
}

.ck-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-strong, #f0f4f8);
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}

.ck-modal-subtitle {
  font-size: 12.5px;
  color: var(--text-muted, #7a8799);
  margin: 0;
  line-height: 1.5;
}

/* ── PREFERENCE ROWS ── */
.ck-modal-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border, #1c2026);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.ck-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border, #1c2026);
  background: var(--surface-2, #181b1f);
  transition: background 0.15s;
}

.ck-row:last-child { border-bottom: none; }
.ck-row:first-child { background: var(--surface-3, #1f2328); }

.ck-row-body { flex: 1; min-width: 0; }

.ck-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong, #f0f4f8);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ck-always-on {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #8abf3c);
  background: var(--accent-soft, rgba(138,191,60,.1));
  border: 1px solid rgba(138,191,60,.2);
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1.4;
}

.ck-row-desc {
  font-size: 12px;
  color: var(--text-muted, #7a8799);
  margin: 0;
  line-height: 1.55;
}

/* ── TOGGLE SWITCH ── */
.ck-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  width: 44px;
  height: 24px;
}

.ck-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ck-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3, #1f2328);
  border: 1.5px solid var(--border-strong, #262c34);
  border-radius: 24px;
  transition: background 0.22s, border-color 0.22s;
}

.ck-slider::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-dim, #4a5568);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.22s;
}

.ck-toggle input:checked + .ck-slider {
  background: var(--accent, #8abf3c);
  border-color: var(--accent, #8abf3c);
}

.ck-toggle input:checked + .ck-slider::after {
  transform: translateY(-50%) translateX(20px);
  background: #0a1500;
}

.ck-toggle input:focus-visible + .ck-slider {
  box-shadow: 0 0 0 3px rgba(138,191,60,0.25);
}

.ck-toggle-disabled {
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
}

/* ── MODAL FOOTER ── */
.ck-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 14px;
}

@media (max-width: 420px) {
  .ck-modal-footer {
    flex-direction: column-reverse;
  }
  .ck-modal-footer .ck-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }
}

.ck-modal-note {
  font-size: 11.5px;
  color: var(--text-dim, #4a5568);
  text-align: center;
  margin: 0;
}

.ck-modal-note a {
  color: var(--text-muted, #7a8799);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.ck-modal-note a:hover { color: var(--accent, #8abf3c); }
