/*
 * RAMIKE — Estilos del banner y panel de configuración de cookies.
 * Compartido por index.html, aviso-legal.html, privacidad.html y cookies.html.
 * Usa las mismas variables de color que la web principal (--bg, --brand, etc.)
 * cuando existen; si no existen (páginas legales con su propio :root reducido),
 * caen a los valores por defecto indicados tras la coma.
 */

#ramikeCookieConsent,
#ramikeCookieConsent * {
  box-sizing: border-box;
}

#ramikeCookieConsent {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* El atributo hidden debe ganar siempre a las reglas de display de abajo:
   sin esto, .ramike-cc-banner/.ramike-cc-modal-overlay (que fijan su propio
   display) permanecerían visibles aunque tuvieran el atributo hidden. */
.ramike-cc-banner[hidden],
.ramike-cc-modal-overlay[hidden] {
  display: none !important;
}

/* Oculta el lanzador del asistente de IA mientras el banner o el panel de
   cookies estén abiertos, para que no se solapen visualmente. No toca ni
   modifica el comportamiento propio del asistente. */
body.ramike-cc-open .ramike-ai-assistant {
  display: none !important;
}

.ramike-cc-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  max-width: 620px;
  margin: 0 auto;
  z-index: 10500;
  background: rgba(8, 10, 26, .94);
  border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: var(--radius-sm, 18px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text, #f7f8ff);
}

.ramike-cc-copy strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
  letter-spacing: -.01em;
}

.ramike-cc-copy p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--muted, #aab0cf);
}

.ramike-cc-copy a {
  color: var(--brand-2, #00e5ff);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ramike-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ramike-cc-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.09);
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.ramike-cc-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.13);
}

.ramike-cc-btn:focus-visible {
  outline: 2px solid var(--brand-2, #00e5ff);
  outline-offset: 2px;
}

/* Aceptar y Rechazar comparten exactamente el mismo tamaño, forma y peso
   visual: misma clase base, mismo flex-basis, sin color que induzca a
   pulsar una sobre la otra. */
.ramike-cc-btn-reject,
.ramike-cc-btn-accept {
  flex: 1 1 130px;
  text-align: center;
}

/* "Configurar" es una acción de texto, siempre visible y con el mismo
   tamaño de fuente y área de toque cómoda, pero con un estilo distinto
   (subrayado, sin fondo) para diferenciarla como tercera opción sin
   restarle accesibilidad ni visibilidad. */
.ramike-cc-btn-settings {
  flex: 1 1 100%;
  min-height: 40px;
  background: transparent;
  border-color: transparent;
  color: var(--muted, #aab0cf);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.ramike-cc-btn-settings:hover {
  color: #fff;
  background: transparent;
  border-color: transparent;
  transform: none;
}

.ramike-cc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10600;
  background: rgba(2, 3, 10, .74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ramike-cc-modal {
  width: min(480px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: rgba(8, 10, 26, .97);
  border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: var(--radius, 28px);
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
  padding: 26px;
  color: var(--text, #f7f8ff);
}

.ramike-cc-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ramike-cc-modal-head h2 {
  font-size: 1.15rem;
  margin: 0;
  letter-spacing: -.01em;
}

.ramike-cc-modal-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.ramike-cc-modal-close:hover {
  background: rgba(255,255,255,.14);
}

.ramike-cc-modal-intro {
  margin: 0 0 18px;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--muted, #aab0cf);
}

.ramike-cc-category {
  border: 1px solid var(--line, rgba(255,255,255,.12));
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--glass, rgba(255,255,255,.05));
}

.ramike-cc-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  font-size: .92rem;
}

.ramike-cc-category p {
  margin: 10px 0 0;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--muted, #aab0cf);
}

.ramike-cc-toggle {
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  position: relative;
  cursor: pointer;
  padding: 0;
}

.ramike-cc-toggle-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}

.ramike-cc-toggle.is-on {
  background: linear-gradient(135deg, var(--brand, #7c5cff), var(--brand-2, #00e5ff));
  border-color: transparent;
}

.ramike-cc-toggle.is-on .ramike-cc-toggle-dot {
  transform: translateX(20px);
}

.ramike-cc-toggle-locked {
  opacity: .65;
  cursor: default;
  background: rgba(255,255,255,.12);
}

.ramike-cc-toggle-locked .ramike-cc-toggle-dot {
  transform: translateX(20px);
  background: rgba(255,255,255,.75);
}

.ramike-cc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.ramike-cc-modal-actions .ramike-cc-btn {
  flex: 1 1 160px;
}

@media (max-width: 520px) {
  .ramike-cc-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 18px;
  }

  .ramike-cc-btn-reject,
  .ramike-cc-btn-accept {
    flex: 1 1 100%;
  }

  .ramike-cc-modal {
    padding: 20px;
  }
}
