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

:root {
  --ccc-bg: #ffffff;
  --ccc-bg-alt: #f3f4f6;
  --ccc-primary: #004c97; /* azul turismo Castellón aprox */
  --ccc-primary-dark: #003566;
  --ccc-text: #111827;
  --ccc-muted: #6b7280;
  --ccc-border: #e5e7eb;
}

.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: #0f172a;
  background: linear-gradient(135deg, #020617 0%, #0f172a 45%, #004c97 100%);
  color: #f9fafb;
  padding: 16px 20px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.55);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  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: #facc15;
  color: #1f2933;
  border-color: #ca8a04;
}

.ccc-btn-primary:hover {
  background: #ca8a04;
  color: #f9fafb;
}

.ccc-btn-outline {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(249, 250, 251, 0.5);
}

.ccc-btn-outline:hover {
  background: rgba(15, 23, 42, 0.4);
}

.ccc-btn-ghost {
  background: transparent;
  color: #f9fafb;
  border-color: transparent;
  text-decoration: underline;
}

.ccc-btn-ghost:hover {
  color: #e5e7eb;
}

/* 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: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Cabecera */

.ccc-modal-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: radial-gradient(circle at top left, #1f2937 0, #020617 55%);
  color: #f9fafb;
}

.ccc-site-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

.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(249, 250, 251, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #f9fafb;
}

.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: var(--ccc-primary);
  color: #111827;
  border-color: var(--ccc-primary-dark);
}

.ccc-level-pill.ccc-active .ccc-dot {
  background: #111827;
}

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

.ccc-duration-select select {
  border-radius: 999px;
  border: 1px solid rgba(249, 250, 251, 0.4);
  background: rgba(15, 23, 42, 0.6);
  color: #f9fafb;
  padding: 4px 10px;
  font-size: 12px;
}

.ccc-modal-close {
  border: none;
  background: transparent;
  color: #e5e7eb;
  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: var(--ccc-bg-alt);
  border-radius: 12px;
  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: center;
}

.ccc-card-title {
  font-weight: 600;
  color: var(--ccc-text);
  font-size: 13px;
}

.ccc-tag-required {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
}

/* 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: #f9fafb;
  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-dark);
  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 var(--ccc-primary-dark);
  background: transparent;
  color: var(--ccc-primary-dark);
  cursor: pointer;
  transition: all 0.18s ease;
}

.ccc-manage-btn:hover {
  background: var(--ccc-primary);
  color: #ffffff;
}
