/* Todos los estilos están limitados a los controles del plugin y a componentes PDCC marcados. */
#tid-pdcc-floating-cookie {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 999px;
    background: #fff;
    color: #111827;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease, bottom .18s ease;
    appearance: none;
    -webkit-appearance: none;
}

#tid-pdcc-floating-cookie.tid-pdcc-floating-cookie-visible {
    display: inline-flex;
    opacity: 1;
    transform: translateY(0);
}

#tid-pdcc-floating-cookie:hover,
#tid-pdcc-floating-cookie:focus-visible {
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.28);
    transform: translateY(-2px);
}

#tid-pdcc-floating-cookie:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

#tid-pdcc-floating-cookie span {
    display: block;
    font-size: 28px;
    line-height: 1;
}

body.tid-cookie-rejected-bar-visible #tid-pdcc-floating-cookie {
    bottom: 98px;
}

#tid-pdcc-rejected-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 15px 16px 15px 20px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 14px;
    background: #f8fafc;
    color: #111827;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.24);
    font-family: inherit;
    line-height: 1.35;
}

#tid-pdcc-rejected-bar.tid-pdcc-rejected-bar-visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}

#tid-pdcc-rejected-bar .tid-pdcc-rejected-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

#tid-pdcc-rejected-bar .tid-pdcc-rejected-copy strong,
#tid-pdcc-rejected-bar .tid-pdcc-rejected-copy span {
    color: #111827;
}

#tid-pdcc-rejected-bar .tid-pdcc-rejected-copy strong {
    font-size: 15px;
}

#tid-pdcc-rejected-bar .tid-pdcc-rejected-copy span {
    font-size: 13px;
}

#tid-pdcc-rejected-bar .tid-pdcc-rejected-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

#tid-pdcc-rejected-bar button {
    min-height: 40px;
    margin: 0;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

#tid-pdcc-rejected-configure {
    border-color: rgba(37, 99, 235, 0.18) !important;
    background: #e0ecff !important;
    color: #0f172a !important;
}

#tid-pdcc-rejected-accept {
    background: #2563eb !important;
    color: #fff !important;
}

#tid-pdcc-rejected-close {
    width: 40px;
    min-width: 40px;
    padding: 0 !important;
    border-color: #dbe2ea !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 22px !important;
}

#tid-pdcc-rejected-bar button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.tid-pdcc-reject-button,
.tid-pdcc-reject-button * {
    color: #111827 !important;
}

.tid-pdcc-blocked-message {
    background: #f8fafc !important;
    color: #111827 !important;
    border-top: 1px solid rgba(37, 99, 235, 0.22) !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18) !important;
}

@media (max-width: 768px) {
    #tid-pdcc-floating-cookie {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
    }

    #tid-pdcc-floating-cookie span {
        font-size: 25px;
    }

    body.tid-cookie-rejected-bar-visible #tid-pdcc-floating-cookie {
        bottom: 156px;
    }

    #tid-pdcc-rejected-bar {
        left: 10px;
        right: 10px;
        bottom: 10px;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    #tid-pdcc-rejected-bar .tid-pdcc-rejected-actions {
        display: grid;
        grid-template-columns: 1fr 1fr 40px;
    }

    #tid-pdcc-rejected-bar button {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Salvaguarda 2.1.2: la barra debe quedar por encima de cualquier constructor visual. */
html body #tid-pdcc-rejected-bar.tid-pdcc-rejected-bar-visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 2147483646 !important;
}

html body .tid-pdcc-blocked-message {
    position: relative;
    z-index: 2147483000;
}
