/* ── Cookie consent banner + modal ── */

/* Banner inferior */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(28,30,35,0.7);
  border-top: 1px solid rgba(180,185,195,0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 18px 24px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.cookie-banner.visible { transform: translateY(0); }

.cookie-banner-text {
  flex: 1;
  min-width: 220px;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.cookie-banner-text strong {
  color: #e6edf3;
  font-size: 0.88rem;
  display: block;
  margin-bottom: 4px;
}
.cookie-banner-text a {
  color: #4d82c4;
  text-decoration: underline;
}

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

.cookie-btn {
  border: none;
  border-radius: 7px;
  padding: 9px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.cookie-btn--customize {
  background: rgba(0,18,43,0.22);
  color: #3d6fad;
  border: 1px solid rgba(0,18,43,0.45);
}
.cookie-btn--customize:hover { background: rgba(0,18,43,0.38); }
.cookie-btn--accept {
  background: rgba(0,18,43,0.5);
  color: #fff;
}
.cookie-btn--accept:hover { background: rgba(0,18,43,0.75); }
.cookie-btn--save {
  background: rgba(0,18,43,0.75);
  color: #fff;
  width: 100%;
  padding: 11px;
  font-size: 0.88rem;
  margin-top: 4px;
}
.cookie-btn--save:hover { background: rgba(0,18,43,0.92); }

/* Modal de preferencias */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cookie-modal-overlay.open { display: flex; }

.cookie-modal {
  background: #161b22;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  position: relative;
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.cookie-modal-header svg { color: #4d82c4; flex-shrink: 0; }
.cookie-modal-header h2 {
  color: #e6edf3;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.cookie-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.35);
  display: flex; align-items: center;
  padding: 4px;
  transition: color 0.2s;
}
.cookie-modal-close:hover { color: #e6edf3; }

.cookie-modal-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.55;
  margin-bottom: 22px;
}
.cookie-modal-desc a { color: #4d82c4; text-decoration: underline; }

/* Categorías */
.cookie-category {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.cookie-category-info { flex: 1; }
.cookie-category-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 3px;
}
.cookie-category-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.45;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}
.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: rgba(0,18,43,0.75); }
.cookie-toggle input:checked + .cookie-toggle-slider::before { transform: translateX(18px); }
.cookie-toggle input:disabled + .cookie-toggle-slider { opacity: 0.5; cursor: not-allowed; }
.cookie-toggle input:disabled:checked + .cookie-toggle-slider { background: #001a3d; }

.cookie-always-on {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 3px;
}

/* Botón circular de preferencias en listas de iconos sociales */
.cookie-fab {
  width: 45px;
  height: 45px;
  background: rgba(13,17,23,0.5);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.cookie-fab:hover {
  background: rgba(0,18,43,0.7);
  border-color: rgba(255,255,255,0.4);
  transform: scale(1.08);
}
.cookie-fab svg { color: #fff; }

@media (max-width: 600px) {
  .cookie-banner { padding: 14px 16px; gap: 14px; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
  .cookie-modal { padding: 22px 18px 20px; }
}
