/* Castellón Cookie Consent - estilos principales */

:root {
  --ccc-bg: #ffffff;
  --ccc-bg-alt: rgba(15,23,42,.02);
  --ccc-primary: #0B4FAE; /* PadelCAS azul */
  --ccc-primary-dark: #083B83;
  --ccc-accent: #F97316; /* PadelCAS naranja */
  --ccc-text: #0F172A;
  --ccc-muted: #64748B;
  --ccc-border: rgba(15,23,42,.12);
  --ccc-radius: 22px;
  --ccc-shadow: 0 18px 55px rgba(2,6,23,.10);
  --ccc-shadow-sm: 0 10px 30px rgba(2,6,23,.08);
}

.ccc-hidden {
  display: none !important;
}

/* Banner como tarjeta flotante a 3/4 de altura */

.ccc-banner {
  position: fixed;
  z-index: 9999;
  left: 50%;
  transform: translateX(-50%);
  bottom: 15vh; /* ~3/4 de la pantalla: ajustable */
  width: min(960px, 100vw - 32px);
  background:
    radial-gradient(900px 320px at 18% 0%, rgba(11,79,174,.22), transparent 60%),
    radial-gradient(700px 260px at 90% 20%, rgba(249,115,22,.18), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  color: var(--ccc-text);
  padding: 16px 20px;
  font-family: Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: var(--ccc-shadow);
  border-radius: 28px;
  border: 1px solid var(--ccc-border);
  font-size: 13px;
}

.ccc-banner-text {
  flex: 1 1 260px;
  line-height: 1.4;
}

.ccc-banner-text b {
  font-weight: 600;
}

.ccc-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Botones banner */

.ccc-btn {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.ccc-btn-primary {
  background: var(--ccc-accent);
  color: #ffffff;
  border-color: rgba(249,115,22,.35);
}

.ccc-btn-primary:hover {
  filter: brightness(.92);
}

.ccc-btn-outline {
  background: transparent;
  color: rgba(15,23,42,.86);
  border-color: rgba(15,23,42,.18);
}

.ccc-btn-outline:hover {
  background: rgba(11,79,174,.06);
}

.ccc-btn-ghost {
  background: transparent;
  color: rgba(15,23,42,.86);
  border-color: transparent;
  text-decoration: underline;
}

.ccc-btn-ghost:hover {
  color: rgba(15,23,42,.86);
}

/* Modal */

.ccc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.ccc-modal {
  width: min(1000px, 100vw - 32px);
  max-height: min(90vh, 800px);
  background: var(--ccc-bg);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.35);
  font-family: Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

/* Cabecera */

.ccc-modal-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    radial-gradient(900px 240px at 18% 0%, rgba(11,79,174,.22), transparent 60%),
    radial-gradient(700px 220px at 90% 20%, rgba(249,115,22,.18), transparent 62%),
    rgba(255,255,255,.92);
  color: var(--ccc-text);
}

.ccc-site-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ccc-primary);
  opacity: .95;
}

.ccc-levels {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ccc-level-pill {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid rgba(15,23,42,.14);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: rgba(15,23,42,.86);
}

.ccc-level-pill span.ccc-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  background: rgba(249, 250, 251, 0.6);
}

.ccc-level-pill.ccc-active {
  background: rgba(11,79,174,.10);
  color: var(--ccc-primary);
  border-color: rgba(11,79,174,.28);
}

.ccc-level-pill.ccc-active .ccc-dot {
  background: var(--ccc-primary);
}

.ccc-duration-select {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.ccc-duration-select select {
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.18);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(15,23,42,.86);
  padding: 4px 10px;
  font-size: 12px;
}

.ccc-modal-close {
  border: none;
  background: transparent;
  color: rgba(15,23,42,.86);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  margin-left: 8px;
}

/* Cuerpo */

.ccc-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.ccc-modal-intro {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--ccc-muted);
}

.ccc-modal-intro h2 {
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--ccc-text);
}

/* Grid de categorías */

.ccc-consent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1024px) {
  .ccc-consent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ccc-consent-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ccc-banner {
    left: 0;
    right: 0;
    transform: none;
    bottom: 10px;
    width: auto;
    margin: 0 10px;
  }

  .ccc-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.ccc-card {
  background: rgba(255,255,255,.92);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--ccc-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.ccc-card-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}


.ccc-card-title {
  font-weight: 600;
  color: var(--ccc-text);
  font-size: 13px;
  flex: 1 1 auto;
  min-width: 0;
}


.ccc-tag-required {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  white-space: nowrap;
  flex: 0 0 auto;
}


/* Toggle */

.ccc-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  cursor: pointer;
  background: #d1d5db;
  flex-shrink: 0;
}

.ccc-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.18s ease;
}

.ccc-toggle.ccc-on {
  background: #16a34a;
}

.ccc-toggle.ccc-on .ccc-toggle-knob {
  transform: translateX(16px);
}

.ccc-card-desc {
  color: var(--ccc-muted);
}

.ccc-card-list {
  margin-top: 4px;
  padding-left: 16px;
  color: var(--ccc-muted);
}

.ccc-card-list li {
  margin-bottom: 2px;
}

/* Footer del modal */

.ccc-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--ccc-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  background: rgba(255,255,255,.92);
  font-size: 12px;
  color: var(--ccc-muted);
}

.ccc-modal-footer .ccc-footer-left {
  flex: 1 1 auto;
}

.ccc-modal-footer .ccc-footer-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ccc-link {
  color: var(--ccc-primary);
  text-decoration: underline;
  cursor: pointer;
}

/* Botón de gestión (shortcode) */

.ccc-manage-btn {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  border: 1px solid rgba(11,79,174,.28);
  background: transparent;
  color: var(--ccc-primary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.ccc-manage-btn:hover {
  background: rgba(11,79,174,.10);
  color: var(--ccc-primary);
}

/* Botón flotante para reabrir el panel de cookies */
.ccc-floating-btn {
  position: fixed;
  z-index: 9999;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(11,79,174,.95);
  color: rgba(15,23,42,.86);
  border: 1px solid rgba(255,255,255,.22);
  font-size: 12px;
  font-weight: 600;
  font-family: Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  cursor: pointer;
  box-shadow: var(--ccc-shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ccc-floating-btn:hover {
  filter: brightness(.95);
}

/* Posiciones posibles (20px de margen respecto a los bordes) */
.ccc-pos-bottom-left {
  left: 20px;
  bottom: 20px;
}

.ccc-pos-bottom-right {
  right: 20px;
  bottom: 20px;
}

.ccc-pos-top-left {
  left: 20px;
  top: 20px;
}

.ccc-pos-top-right {
  right: 20px;
  top: 20px;
}
