/* plg_system_avisocookies — (C) 2026 Atlantis Nesos · GPL-2.0-or-later */

.avc, .avc-bloqueado {
  --avc-fondo: #ffffff;
  --avc-texto: #172033;
  --avc-suave: #55617a;
  --avc-borde: #dfe5ee;
  --avc-campo: #b9c3d3;
  --avc-banda: #f3f6fa;
  --avc-sombra: 0 18px 50px rgba(5, 12, 28, .28);
  font-family: var(--avc-fuente, inherit);
}

.avc-tema-oscuro,
html[data-bs-theme="dark"] .avc-tema-auto,
html[data-bs-theme="dark"] .avc-bloqueado {
  --avc-fondo: #151f30;
  --avc-texto: #e6ecf5;
  --avc-suave: #a7b4c8;
  --avc-borde: #2a3850;
  --avc-campo: #3b4b66;
  --avc-banda: #1b273b;
  --avc-sombra: 0 18px 50px rgba(0, 0, 0, .55);
}

@media (prefers-color-scheme: dark) {
  html:not([data-bs-theme]) .avc-tema-auto,
  html:not([data-bs-theme]) .avc-bloqueado {
    --avc-fondo: #151f30;
    --avc-texto: #e6ecf5;
    --avc-suave: #a7b4c8;
    --avc-borde: #2a3850;
    --avc-campo: #3b4b66;
    --avc-banda: #1b273b;
    --avc-sombra: 0 18px 50px rgba(0, 0, 0, .55);
  }
}

.avc *, .avc *::before, .avc *::after { box-sizing: border-box; }

/* ---------- Aviso ---------- */
.avc-aviso { position: fixed; z-index: 2147483000; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: center; pointer-events: none; }
.avc-aviso[hidden] { display: none; }
.avc-aviso-in { pointer-events: auto; width: 100%; max-width: 980px; display: flex; gap: 16px 24px; align-items: center; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--avc-radio, 16px); background: var(--avc-fondo); color: var(--avc-texto); border: 1px solid var(--avc-borde); box-shadow: var(--avc-sombra); }
.avc-pos-izquierda { justify-content: flex-start; }
.avc-pos-derecha { justify-content: flex-end; }
.avc-pos-izquierda .avc-aviso-in, .avc-pos-derecha .avc-aviso-in { max-width: 420px; }
.avc-pos-centro { inset: 0; align-items: center; padding: 16px; background: rgba(5, 12, 28, .55); pointer-events: auto; }
.avc-pos-centro .avc-aviso-in { max-width: 560px; }
.avc-texto { flex: 1 1 320px; font-size: 15px; line-height: 1.5; }
.avc-texto p { margin: 0; }
.avc .avc-titulo { font-weight: 800; font-size: 17px; margin: 0 0 4px; }
.avc .avc-texto a, .avc .avc-politica a { color: inherit; font-weight: 700; text-decoration: underline; }
.avc-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.avc-pos-izquierda .avc-botones, .avc-pos-derecha .avc-botones, .avc-pos-centro .avc-botones { width: 100%; }

.avc-boton { cursor: pointer; border: 1.5px solid var(--avc-campo); background: var(--avc-fondo); color: var(--avc-texto); font: inherit; font-weight: 700; font-size: 15px; line-height: 1.2; padding: 10px 18px; border-radius: 999px; min-height: 44px; }
.avc-boton:hover { border-color: var(--avc-color); color: var(--avc-color); }
html[data-bs-theme="dark"] .avc-tema-auto .avc-boton:hover, .avc-tema-oscuro .avc-boton:hover { color: var(--avc-texto); }
.avc .avc-principal, .avc-bloqueado .avc-principal { background: var(--avc-color); border-color: var(--avc-color); color: #fff; }
.avc .avc-principal:hover, .avc-bloqueado .avc-principal:hover { filter: brightness(.9); color: #fff; }
.avc-boton:focus-visible, .avc-cerrar:focus-visible, .avc-flotante:focus-visible { outline: 3px solid var(--avc-color); outline-offset: 2px; }

/* ---------- Configuración ---------- */
.avc-dialogo { width: 560px; max-width: calc(100% - 32px); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--avc-radio, 16px); background: var(--avc-fondo); color: var(--avc-texto); box-shadow: var(--avc-sombra); overflow: hidden; font-family: var(--avc-fuente, inherit); }
.avc-dialogo[open] { display: flex; }
.avc-dialogo::backdrop { background: rgba(5, 12, 28, .6); }
.avc-dialogo-in { display: flex; flex-direction: column; width: 100%; max-height: inherit; min-height: 0; }
.avc-cab { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--avc-borde); }
.avc .avc-cab h2 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.2; color: inherit; }
.avc-cerrar { cursor: pointer; width: 40px; height: 40px; flex-shrink: 0; padding: 0; border-radius: 999px; border: 1px solid var(--avc-borde); background: transparent; color: inherit; display: flex; align-items: center; justify-content: center; }
.avc-cuerpo { padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; }
.avc-cat { border: 1px solid var(--avc-borde); border-radius: 12px; padding: 12px 14px; }
.avc-cat p { margin: 8px 0 0; font-size: 14px; color: var(--avc-suave); line-height: 1.5; }
.avc-politica { margin: 0; font-size: 14px; }
.avc-pie { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--avc-borde); background: var(--avc-banda); }

.avc-interruptor { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; }
.avc-interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.avc-pista { width: 44px; height: 26px; border-radius: 999px; background: var(--avc-campo); position: relative; flex-shrink: 0; transition: background .15s; }
.avc-pista::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.avc-interruptor input:checked + .avc-pista { background: var(--avc-color); }
.avc-interruptor input:checked + .avc-pista::after { transform: translateX(18px); }
.avc-interruptor input:disabled + .avc-pista { opacity: .6; }
.avc-interruptor input:focus-visible + .avc-pista { outline: 3px solid var(--avc-color); outline-offset: 2px; }
.avc-siempre { margin-left: auto; font-size: 13px; color: var(--avc-suave); }

/* ---------- Botón para reabrir ---------- */
.avc-flotante { position: fixed; z-index: 2147482000; left: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--avc-borde); background: var(--avc-fondo); color: var(--avc-texto); box-shadow: 0 6px 18px rgba(5, 12, 28, .2); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; opacity: .85; }
.avc-flotante[hidden] { display: none; }
.avc-flotante:hover { opacity: 1; color: var(--avc-color); }

/* ---------- Contenido de terceros bloqueado ---------- */
.avc-bloqueado { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; margin: 0 0 8px; border-radius: 12px; background: var(--avc-banda); color: var(--avc-texto); border: 1px dashed var(--avc-campo); font-size: 15px; width: 100%; font-family: var(--avc-fuente, inherit); }
.avc-bloqueado p { margin: 0; max-width: 420px; }
.avc-bloqueado + iframe[data-avisocookies-src] { display: none; }

@media (max-width: 599.98px) {
  .avc-aviso { left: 8px; right: 8px; bottom: 8px; }
  .avc-aviso-in { padding: 16px; }
  .avc-botones { width: 100%; }
  .avc-botones .avc-boton { flex: 1 1 auto; }
  .avc-botones .avc-principal { flex-basis: 100%; order: -1; }
  .avc-dialogo { max-width: 100%; width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .avc-pie .avc-boton { flex: 1 1 auto; }
}

@media print {
  .avc { display: none !important; }
}
