/* TCA Cookies: aviso, panel de preferencias y botón flotante. Color principal en --tca-ck-color. */

.tca-ck,
.tca-ck-prefs,
.tca-ck-float {
    --tca-ck-text: #1d1f23;
    --tca-ck-muted: #5d636d;
    --tca-ck-bg: #ffffff;
    --tca-ck-border: #dcdfe4;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: var(--tca-ck-text);
}

.tca-ck[hidden],
.tca-ck-prefs[hidden],
.tca-ck-float[hidden] {
    display: none !important;
}

/* ---------------------------------------------------------------------------
 * Aviso: barra inferior
 * ------------------------------------------------------------------------ */

.tca-ck--barra {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    padding: 16px;
    background: var(--tca-ck-bg);
    border-top: 4px solid var(--tca-ck-color);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.tca-ck--barra .tca-ck__banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 32px;
    max-width: 1140px;
    margin: 0 auto;
}

.tca-ck--barra .tca-ck__text {
    flex: 1 1 420px;
}

/* ---------------------------------------------------------------------------
 * Aviso: ventana centrada
 * ------------------------------------------------------------------------ */

.tca-ck--modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}

.tca-ck--modal .tca-ck__banner {
    width: 100%;
    max-width: 520px;
    padding: 24px;
    border-top: 4px solid var(--tca-ck-color);
    border-radius: 10px;
    background: var(--tca-ck-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.tca-ck--modal .tca-ck__actions {
    margin-top: 16px;
}

/* ---------------------------------------------------------------------------
 * Textos y botones
 * ------------------------------------------------------------------------ */

.tca-ck__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
}

.tca-ck__msg {
    margin: 0;
    color: var(--tca-ck-muted);
}

.tca-ck a,
.tca-ck-prefs a {
    color: var(--tca-ck-color);
    text-decoration: underline;
}

.tca-ck__actions,
.tca-ck-prefs__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* "Aceptar" y "Solo necesarias" tienen el mismo peso visual: ninguna opción se impone. */
.tca-ck__btn {
    min-height: 40px;
    padding: 8px 18px;
    border: 2px solid var(--tca-ck-color);
    border-radius: 6px;
    background: var(--tca-ck-color);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tca-ck__btn:hover {
    filter: brightness(1.1);
}

.tca-ck__btn--outline {
    background: transparent;
    color: var(--tca-ck-color);
}

.tca-ck__btn--link {
    border-color: transparent;
    background: transparent;
    color: var(--tca-ck-color);
    text-decoration: underline;
}

.tca-ck__btn:focus-visible,
.tca-ck-prefs__close:focus-visible,
.tca-ck-float:focus-visible,
.tca-ck-link:focus-visible,
.tca-ck-switch input:focus-visible + .tca-ck-switch__track {
    outline: 3px solid #ffb626;
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Panel de preferencias
 * ------------------------------------------------------------------------ */

html.tca-ck-open {
    overflow: hidden;
}

.tca-ck-prefs {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.5);
}

.tca-ck-prefs__box {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 24px;
    border-radius: 10px;
    background: var(--tca-ck-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    outline: none;
}

.tca-ck-prefs__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.tca-ck-prefs__title {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--tca-ck-text);
    font-size: 20px;
    text-transform: none;
}

.tca-ck-prefs__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f0f1f3;
    color: var(--tca-ck-text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.tca-ck-prefs__intro {
    margin: 8px 0 16px;
    color: var(--tca-ck-muted);
}

.tca-ck-cat {
    padding: 12px 0;
    border-top: 1px solid var(--tca-ck-border);
}

.tca-ck-cat__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.tca-ck-cat__name {
    font-weight: 700;
}

.tca-ck-cat__always {
    color: var(--tca-ck-muted);
    font-size: 13px;
}

.tca-ck-cat__desc {
    margin: 4px 0 0;
    color: var(--tca-ck-muted);
    font-size: 14px;
}

.tca-ck-prefs__actions {
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tca-ck-border);
}

/* Interruptor */
.tca-ck-switch {
    position: relative;
    display: inline-block;
    flex: none;
    width: 46px;
    height: 26px;
    cursor: pointer;
}

.tca-ck-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.tca-ck-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    background: #c3c4c7;
    transition: background 0.2s;
}

.tca-ck-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.tca-ck-switch input:checked + .tca-ck-switch__track {
    background: var(--tca-ck-color);
}

.tca-ck-switch input:checked + .tca-ck-switch__track::after {
    transform: translateX(20px);
}

/* ---------------------------------------------------------------------------
 * Botón flotante y enlace del shortcode
 * ------------------------------------------------------------------------ */

/* Abajo a la izquierda: a la derecha suelen ir el chat de HubSpot y los popups. */
.tca-ck-float {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--tca-ck-color);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.tca-ck-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 600px) {
    .tca-ck__actions .tca-ck__btn,
    .tca-ck-prefs__actions .tca-ck__btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tca-ck-switch__track,
    .tca-ck-switch__track::after {
        transition: none;
    }
}
