:root { --lhc-accent: var(--ast-global-color-0, #1d4ed8); }
[hidden] { display: none !important; }

.lhc-btn { display: inline-block; padding: .7em 1.2em; border: 2px solid var(--lhc-accent); border-radius: 4px; background: var(--lhc-accent); color: #fff !important; font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none !important; cursor: pointer; }
.lhc-btn:hover, .lhc-btn:focus { filter: brightness(.92); }
.lhc-btn--ghost { background: transparent; color: var(--lhc-accent) !important; }
.lhc-btn:focus-visible, .lhc-fab:focus-visible, .lhc-cm__close:focus-visible { outline: 3px solid #111; outline-offset: 2px; }

/* Banner inferior */
.lhc-cb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99998; display: flex; gap: 1.5em; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 1.2em clamp(1em, 4vw, 3em); background: #fff; color: #222; border-top: 4px solid var(--lhc-accent); box-shadow: 0 -6px 24px rgba(0,0,0,.18); font-size: .95rem; line-height: 1.5; }
.lhc-cb__text { flex: 1 1 420px; }
.lhc-cb__text p { margin: .3em 0 0; }
.lhc-cb__text a { color: var(--lhc-accent); text-decoration: underline; }
.lhc-cb__actions { display: flex; flex-wrap: wrap; gap: .6em; }

/* Modal */
.lhc-cm { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 1em; background: rgba(0,0,0,.55); }
.lhc-cm__box { position: relative; width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; padding: 1.8em; background: #fff; color: #222; border-radius: 8px; border-top: 5px solid var(--lhc-accent); }
.lhc-cm__box h2 { margin: 0 0 .4em; font-size: 1.4em; color: #222; }
.lhc-cm__close { position: absolute; top: .4em; right: .7em; border: 0; background: none; font-size: 1.9em; line-height: 1; cursor: pointer; color: #555; }
.lhc-cm__actions { display: flex; flex-wrap: wrap; gap: .6em; margin-top: 1.2em; }

/* Categorías */
.lhc-cat { padding: .9em 0; border-bottom: 1px solid rgba(0,0,0,.12); }
.lhc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 1em; cursor: pointer; }
.lhc-cat__title { font-weight: 700; }
.lhc-cat__desc { margin: .35em 0 0; font-size: .92em; opacity: .85; }
.lhc-switch { position: relative; flex: none; width: 46px; height: 26px; }
.lhc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.lhc-switch__ui { position: absolute; inset: 0; border-radius: 26px; background: #9ca3af; transition: background .2s; }
.lhc-switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.lhc-switch input:checked + .lhc-switch__ui { background: var(--lhc-accent); }
.lhc-switch input:checked + .lhc-switch__ui::after { transform: translateX(20px); }
.lhc-switch input:disabled { cursor: not-allowed; }
.lhc-switch input:disabled + .lhc-switch__ui { opacity: .6; }
.lhc-switch input:focus-visible + .lhc-switch__ui { outline: 3px solid #111; outline-offset: 2px; }
.lhc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Botón flotante */
.lhc-fab { position: fixed; left: 22px; bottom: 22px; z-index: 99990; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--lhc-accent); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; }
.lhc-fab svg { width: 58%; height: 58%; }

/* Panel en la página de configuración */
.lhc-cp { max-width: 720px; }
.lhc-cp__status { margin-top: 1em; font-weight: 600; color: var(--lhc-accent); }

/* Tabla de cookies (también fuera de .lhc-legal) */
.lhc-table-wrap { overflow-x: auto; margin: 0 0 1.5em; }
.lhc-table { width: 100%; border-collapse: collapse; font-size: .95em; }
.lhc-table th, .lhc-table td { padding: .65em .8em; border: 1px solid rgba(0,0,0,.15); text-align: left; vertical-align: top; }
.lhc-table thead th { background: var(--lhc-accent); color: #fff; }

@media (max-width: 640px) {
	.lhc-cb { padding: 1em; }
	.lhc-cb__actions .lhc-btn { flex: 1 1 100%; text-align: center; }
	.lhc-cm__actions .lhc-btn { flex: 1 1 100%; text-align: center; }
}
