/* Sistema de Gestión de Consentimiento de Cookies (Ley N.° 21.719) */
.cc-root,
.cc-root * {
  box-sizing: border-box;
}

.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background: #ffffff;
  color: #1f2937;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  padding: 1.1rem 1.25rem;
  display: none;
  font-family: var(--font-body, 'Montserrat', system-ui, sans-serif);
}

.cc-banner.cc-visible {
  display: block;
}

.cc-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.cc-banner-text {
  flex: 1 1 380px;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}

.cc-banner-text a {
  color: var(--cc-primary, #00aedc);
  text-decoration: underline;
}

.cc-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* Botones con la MISMA jerarquía visual (tamaño, peso, contraste) */
.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  min-width: 150px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cc-btn:hover {
  transform: translateY(-1px);
}

.cc-btn-primary,
.cc-btn-secondary {
  background: var(--cc-primary, #00aedc);
  color: var(--cc-on-primary, #ffffff);
  border-color: var(--cc-primary, #00aedc);
}

.cc-btn-ghost {
  background: transparent;
  color: #1f2937;
  border-color: #cbd5e1;
  font-weight: 600;
}

.cc-btn-ghost:hover {
  background: #f1f5f9;
}

/* Modal de preferencias */
.cc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cc-modal-overlay.cc-visible {
  display: flex;
}

.cc-modal {
  background: #ffffff;
  color: #1f2937;
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  font-family: var(--font-body, 'Montserrat', system-ui, sans-serif);
}

.cc-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cc-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.cc-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.cc-modal-body {
  padding: 1.25rem 1.5rem;
}

.cc-modal-intro {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 1rem;
}

.cc-category {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.cc-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cc-category-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.cc-category-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.35rem;
  line-height: 1.4;
}

.cc-category-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
  background: #dcfce7;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* Tooltip informativo (ícono "?") */
.cc-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
}

.cc-info-btn {
  appearance: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cc-info-btn:hover {
  color: var(--cc-primary, #00aedc);
  border-color: var(--cc-primary, #00aedc);
}

.cc-info-btn:focus-visible {
  outline: 2px solid var(--cc-primary, #00aedc);
  outline-offset: 2px;
}

.cc-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 5;
  width: 260px;
  max-width: 72vw;
  background: #111827;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.cc-info-wrap:hover .cc-tooltip,
.cc-info-btn:focus + .cc-tooltip,
.cc-info-wrap.is-open .cc-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Switch */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}

.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.cc-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-slider {
  background: var(--cc-primary, #00aedc);
}

.cc-switch input:checked + .cc-slider::before {
  transform: translateX(20px);
}

.cc-switch input:disabled + .cc-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cc-modal-footer {
  padding: 1.1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .cc-banner-actions {
    width: 100%;
  }

  .cc-btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .cc-modal-footer .cc-btn {
    flex: 1 1 100%;
  }
}
