/* ------------------------------------------------------------------------
   Consentimiento de cookies (LSSI / RGPD)
   Estilos autocontenidos, sin dependencia del theme.
   Los tres botones (Aceptar / Rechazar / Configurar) comparten exactamente
   el mismo peso visual: mismo tamano, mismo contraste, mismo borde.
   ------------------------------------------------------------------------ */

#kd-consent-banner,
#kd-consent-panel {
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}

#kd-consent-banner *,
#kd-consent-panel * {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

/* --------------------------------- Banner ------------------------------- */

#kd-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #1c1c1c;
    color: #f2f2f2;
    padding: 20px 24px;
    box-shadow: 0 -2px 18px rgba(0, 0, 0, .35);
}

.kd-consent-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.kd-consent-text {
    flex: 1 1 420px;
    min-width: 260px;
    margin: 0;
}

/* El theme define `p { color: #3c4043 }`, gris oscuro que sobre el fondo del
   banner queda ilegible. Un color heredado del padre pierde siempre frente a
   una regla que apunta al propio <p>, asi que hay que fijarlo aqui. */
#kd-consent-banner .kd-consent-text,
#kd-consent-banner .kd-consent-text p {
    color: #f7f7f7;
    font-size: 15px;
    line-height: 1.6;
}

#kd-consent-banner .kd-consent-text strong {
    display: block;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 2px;
}

#kd-consent-banner .kd-consent-text a {
    color: #fff;
    text-decoration: underline;
    font-weight: 500;
}

#kd-consent-banner .kd-consent-text a:hover,
#kd-consent-banner .kd-consent-text a:focus {
    color: #fff;
    text-decoration: none;
}

.kd-consent-actions {
    flex: 0 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Botones: identicos entre si. */
.kd-btn {
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    min-width: 132px;
    padding: 11px 18px;
    border: 1px solid #fff;
    border-radius: 3px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    text-align: center;
    transition: background-color .15s ease, color .15s ease;
}

.kd-btn:hover,
.kd-btn:focus {
    background: #fff;
    color: #1c1c1c;
}

.kd-btn:focus-visible {
    outline: 2px solid #7cc1ff;
    outline-offset: 2px;
}

/* --------------------------------- Panel -------------------------------- */

#kd-consent-panel {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
}

.kd-panel-box {
    width: 100%;
    max-width: 640px;
    max-height: 86vh;
    overflow-y: auto;
    background: #fff;
    color: #222;
    border-radius: 4px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}

.kd-panel-box h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.kd-panel-intro {
    margin: 0 0 20px;
    font-size: 14px;
    color: #555;
}

.kd-cat {
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.kd-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.kd-cat-head strong {
    font-size: 15px;
}

.kd-cat p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #555;
}

.kd-cat-fixed {
    font-size: 13px;
    color: #777;
    white-space: nowrap;
}

/* Interruptor accesible: checkbox real, estilado. */
.kd-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.kd-switch input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #1c1c1c;
}

.kd-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.kd-panel-actions .kd-btn {
    border-color: #1c1c1c;
    color: #1c1c1c;
    flex: 1 1 auto;
}

.kd-panel-actions .kd-btn:hover,
.kd-panel-actions .kd-btn:focus {
    background: #1c1c1c;
    color: #fff;
}

.kd-panel-links {
    margin: 16px 0 0;
    font-size: 13px;
}

body.kd-consent-open {
    overflow: hidden;
}

/* ----------------------- Incrustados bloqueados ------------------------- */

.kd-embed {
    position: relative;
    display: block;
    width: 100%;
}

.kd-embed iframe {
    display: block;
    width: 100%;
    min-height: 340px;
    border: 0;
}

.kd-embed-block {
    border: 1px dashed #bbb;
    border-radius: 3px;
    background: #f7f7f7;
    padding: 28px 24px;
    text-align: center;
}

.kd-embed-block-title {
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 15px;
    color: #222;
}

.kd-embed-block-text {
    margin: 0 0 16px;
    font-size: 13px;
    color: #555;
}

.kd-embed-block .kd-btn {
    border-color: #1c1c1c;
    color: #1c1c1c;
    margin: 4px;
}

.kd-embed-block .kd-btn:hover,
.kd-embed-block .kd-btn:focus {
    background: #1c1c1c;
    color: #fff;
}

/* ------------------ Trampa antirrobots del formulario ------------------- */
/* Se oculta fuera de pantalla en vez de con display:none para que los robots
   la rellenen. No es accesible por teclado ni por lector (aria-hidden). */

.kd-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ------------------------- Tabla de cookies ----------------------------- */

.kd-cookie-table-wrap {
    overflow-x: auto;
    margin: 0 0 28px;
}

.kd-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 720px;
}

.kd-cookie-table th,
.kd-cookie-table td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.kd-cookie-table th {
    background: #f4f4f4;
    font-weight: 600;
}

.kd-cookie-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    padding: 0 0 8px;
}

/* ------------------------------ Responsive ------------------------------ */

@media (max-width: 767px) {
    #kd-consent-banner {
        padding: 16px;
    }

    .kd-consent-actions {
        width: 100%;
    }

    .kd-consent-actions .kd-btn {
        flex: 1 1 100%;
        min-width: 0;
    }

    .kd-panel-box {
        padding: 20px;
    }
}
