/* ================================================================
   cookies-consent.css — Servicios en Zaragoza
   Banner y panel de configuración de cookies
   Colores corporativos: #1e5a8e (azul), #f5a623 (amarillo), #0f3d5c (azul oscuro)
   ================================================================ */

/* ── Banner principal ──────────────────────────────────────────── */
#sez-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #0f3d5c;
  color: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  border-top: 3px solid #f5a623;
  animation: sez-slide-up 0.4s ease;
}

@keyframes sez-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.sez-cb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.sez-cb-text {
  flex: 1;
  min-width: 260px;
}

.sez-cb-text p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.sez-cb-text a {
  color: #f5a623;
  text-decoration: underline;
  cursor: pointer;
}

.sez-cb-text a:hover {
  color: #ffb84d;
}

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

/* ── Botones del banner ────────────────────────────────────────── */
.sez-cb-btn {
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  white-space: nowrap;
  line-height: 1.4;
}

.sez-cb-btn:hover  { transform: translateY(-1px); }
.sez-cb-btn:active { transform: translateY(0); }

.sez-cb-btn-primary {
  background: #f5a623;
  color: #0f3d5c;
  border-color: #f5a623;
}
.sez-cb-btn-primary:hover {
  background: #ffb84d;
  border-color: #ffb84d;
}

.sez-cb-btn-secondary {
  background: transparent;
  color: #e2e8f0;
  border-color: #e2e8f0;
}
.sez-cb-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

.sez-cb-btn-outline {
  background: transparent;
  color: #f5a623;
  border-color: #f5a623;
}
.sez-cb-btn-outline:hover {
  background: rgba(245,166,35,0.12);
}

/* ── Panel de configuración (modal) ───────────────────────────── */
#sez-cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.sez-cp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.sez-cp-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 16px;
  animation: sez-fade-in 0.25s ease;
}

@keyframes sez-fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.sez-cp-header {
  background: #1e5a8e;
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sez-cp-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.sez-cp-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.sez-cp-close:hover { opacity: 1; }

.sez-cp-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.sez-cp-body > p {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.5;
}

/* ── Filas de categorías ───────────────────────────────────────── */
.sez-cp-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}
.sez-cp-category:last-child { border-bottom: none; }

.sez-cp-cat-info {
  flex: 1;
}
.sez-cp-cat-info strong {
  display: block;
  font-size: 0.9rem;
  color: #1f2937;
  margin-bottom: 4px;
}
.sez-cp-cat-info p {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
}

.sez-cp-cat-toggle {
  flex-shrink: 0;
  padding-top: 2px;
}

/* ── Toggle switch ─────────────────────────────────────────────── */
.sez-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

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

.sez-toggle-knob {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 24px;
  transition: background 0.2s;
}
.sez-toggle-knob::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sez-toggle input:checked + .sez-toggle-knob {
  background: #1e5a8e;
}
.sez-toggle input:checked + .sez-toggle-knob::before {
  transform: translateX(20px);
}
.sez-toggle input:focus-visible + .sez-toggle-knob {
  outline: 2px solid #f5a623;
  outline-offset: 2px;
}

/* Toggle desactivado (cookies necesarias) */
.sez-toggle-disabled {
  cursor: not-allowed;
  opacity: 0.9;
}
.sez-toggle-disabled .sez-toggle-knob {
  background: #f5a623;
}
.sez-toggle-disabled .sez-toggle-knob::before {
  transform: translateX(20px);
}

/* ── Footer del panel ──────────────────────────────────────────── */
.sez-cp-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: #f9fafb;
}

.sez-cp-footer .sez-cb-btn-secondary {
  color: #4b5563;
  border-color: #d1d5db;
}
.sez-cp-footer .sez-cb-btn-secondary:hover {
  background: #f3f4f6;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sez-cb-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 14px;
  }
  .sez-cb-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .sez-cb-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .sez-cp-footer {
    justify-content: stretch;
  }
  .sez-cp-footer .sez-cb-btn {
    flex: 1;
    text-align: center;
  }
}
