:root {
    --uc-primary: #007cba;
    --uc-primary-hover: #006799;
    --uc-secondary: #646970;
    --uc-text: #1d2327;
    --uc-bg: #ffffff;
    --uc-border: #dcdcde;
    --uc-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.uc-banner-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    background: var(--uc-bg, #ffffff) !important;
    color: var(--uc-text, #1d2327) !important;
    box-shadow: var(--uc-shadow, 0 4px 15px rgba(0,0,0,0.15)) !important;
    border-radius: 8px !important;
    border: 1px solid var(--uc-border, #dcdcde) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    padding: 20px !important;
    display: block !important; 
}

.uc-banner-wrapper:not(.uc-hidden) {
    display: block !important;
}

.uc-inner {
    max-width: var(--uc-inner-max-width, 65%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.uc-content h2 {
    margin: 0 0 10px 0;
    font-size: 1.0rem;
    color: var(--uc-text);
}

.uc-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.uc-policy-links a {
    color: var(--uc-primary);
    text-decoration: underline;
}

.uc-policy-sep {
    margin: 0 0.15em;
    color: #8c8f94;
    text-decoration: none;
}

.uc-content a {
    color: var(--uc-primary);
    text-decoration: underline;
}

.uc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#uc-banner .uc-btn,
.uc-banner-wrapper .uc-btn {
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    line-height: 1.2 !important;
    min-height: 42px !important;
}

#uc-banner .uc-btn-primary {
    background-color: var(--uc-primary) !important;
    color: #fff !important;
    border: 1px solid var(--uc-primary) !important;
}

#uc-banner .uc-btn-secondary {
    background-color: #fff !important;
    border: 1px solid #c3c4c7 !important;
    color: #1d2327 !important;
}

#uc-banner .uc-btn-secondary:hover {
    background-color: #f6f7f7 !important;
}

#uc-banner .uc-btn-link {
    background: transparent !important;
    border: none !important;
    color: var(--uc-primary) !important;
    text-decoration: underline !important;
    padding: 10px 8px !important;
    box-shadow: none !important;
    min-height: auto !important;
}

.uc-hidden {
    display: none !important;
}

#uc-settings-panel,
.uc-accordion {
    border-top: 1px solid #e5e5e5;
    padding-top: 12px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#uc-settings-panel.uc-hidden {
    display: none !important;
}

/* —— Acordeones (reset fuerte frente al tema) —— */
.uc-accordion {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    border-top: none;
    padding-top: 0;
}

.uc-acc-item {
    background: #fff !important;
    border: 1px solid #e2e4e7 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: none !important;
}

.uc-acc-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 0 12px 0 4px !important;
    min-height: 52px !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.uc-acc-toggle,
#uc-banner .uc-acc-toggle,
#uc-cookie-modal .uc-acc-toggle {
    all: unset !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    padding: 14px 10px !important;
    min-height: 52px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #1d2327 !important;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    width: auto !important;
    height: auto !important;
}

.uc-acc-toggle:hover,
.uc-acc-toggle:focus,
.uc-acc-toggle:active {
    background: transparent !important;
    background-color: transparent !important;
    color: #1d2327 !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

.uc-acc-title {
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    color: #1d2327 !important;
}

.uc-acc-badge {
    margin-left: auto !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #0a7a3e !important;
    background: transparent !important;
    white-space: nowrap !important;
    padding: 0 !important;
    border: 0 !important;
}

.uc-acc-chevron {
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-right: 2px solid #646970 !important;
    border-bottom: 2px solid #646970 !important;
    border-top: 0 !important;
    border-left: 0 !important;
    transform: rotate(45deg) !important;
    transition: transform 0.2s ease !important;
    flex-shrink: 0 !important;
    margin: 0 2px 4px 0 !important;
    background: transparent !important;
}

.uc-acc-item.is-open .uc-acc-chevron {
    transform: rotate(-135deg) !important;
    margin-bottom: 0 !important;
    margin-top: 4px !important;
}

.uc-acc-body {
    display: block !important;
    padding: 0 14px 14px !important;
    border-top: 1px solid #eee !important;
    background: #fafafa !important;
}

.uc-acc-body[hidden] {
    display: none !important;
}

.uc-acc-desc {
    margin: 12px 0 8px !important;
    padding: 0 !important;
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    color: #50575e !important;
    font-weight: 400 !important;
}

.uc-acc-body .uc-cookie-list {
    margin: 0 0 0 1.1em !important;
    padding: 0 !important;
    list-style: disc !important;
    font-size: 0.82rem !important;
    color: #3c434a !important;
}

.uc-acc-body .uc-cookie-list-empty {
    margin: 0 !important;
    font-size: 0.8rem !important;
    color: #8c8f94 !important;
    font-style: italic !important;
}

.uc-acc-check[disabled] {
    display: none !important;
}

/* Switch */
.uc-switch {
    position: relative !important;
    display: inline-block !important;
    width: 46px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.uc-switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
}

.uc-switch-slider {
    position: absolute !important;
    cursor: pointer !important;
    inset: 0 !important;
    background: #c3c4c7 !important;
    border-radius: 26px !important;
    transition: 0.2s !important;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06) !important;
}

.uc-switch-slider:before {
    content: "" !important;
    position: absolute !important;
    height: 20px !important;
    width: 20px !important;
    left: 3px !important;
    top: 3px !important;
    background: #fff !important;
    border-radius: 50% !important;
    transition: 0.2s !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

.uc-switch input:checked + .uc-switch-slider {
    background: var(--uc-primary, #5c6b4a) !important;
}

.uc-switch input:checked + .uc-switch-slider:before {
    transform: translateX(20px) !important;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Modal más limpio */
#uc-cookie-modal.uc-cookie-modal,
.uc-cookie-modal {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    background: rgba(0, 0, 0, 0.55) !important;
    box-sizing: border-box !important;
}

.uc-cookie-modal__dialog {
    background: #fff !important;
    padding: 28px 24px 20px !important;
    border-radius: 14px !important;
    max-width: 520px !important;
    width: 100% !important;
    max-height: min(88vh, 720px) !important;
    overflow-y: auto !important;
    position: relative !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25) !important;
    box-sizing: border-box !important;
}

#uc-modal-content > h2 {
    margin: 0 0 8px !important;
    padding: 0 28px 0 0 !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: #1d2327 !important;
    line-height: 1.25 !important;
}

#uc-modal-content > p {
    margin: 0 0 16px !important;
    font-size: 0.9rem !important;
    color: #646970 !important;
    line-height: 1.45 !important;
}

#uc-modal-content .uc-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 16px !important;
    padding-top: 4px !important;
}

#uc-modal-content .uc-btn,
#uc-cookie-modal .uc-btn {
    flex: 1 1 140px !important;
    min-height: 44px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
}

#uc-modal-content .uc-btn-primary {
    background: var(--uc-primary, #5c6b4a) !important;
    color: #fff !important;
    border: 1px solid var(--uc-primary, #5c6b4a) !important;
}

#uc-modal-content .uc-btn-secondary {
    background: #fff !important;
    color: #1d2327 !important;
    border: 1px solid #c3c4c7 !important;
}

.uc-cookie-modal__close {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    border-radius: 50% !important;
    background: #f0f0f1 !important;
    color: #1d2327 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 2 !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.uc-revocation-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    right: auto !important;
    z-index: 999999 !important;
}

.uc-revocation-trigger {
    background: var(--uc-primary, #007cba);
    color: #fff;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.uc-revocation-trigger:hover {
    transform: scale(1.1);
}

.uc-revocation-text {
    font-size: 10px;
    margin-top: 4px;
    line-height: 1;
}
.uc-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 10px;
    font-size: small !important;
}

.uc-option input[type="checkbox"],
.uc-option > label {
    flex: 0 0 auto;
}

.uc-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.uc-option .uc-cookie-list,
.uc-option .uc-cookie-list-empty {
    flex: 1 1 100%;
    margin-left: 28px;
}

.uc-hidden-initial {
    display: none !important;
}
.uc-banner-hidden {
    display: none !important;
}

/* —— Móvil —— */
@media (max-width: 767px) {
    .uc-banner-wrapper {
        left: 10px !important;
        right: 10px !important;
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
        padding: 14px 14px 12px !important;
        border-radius: 12px !important;
        max-height: calc(100vh - 24px - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .uc-inner {
        max-width: 100% !important;
        gap: 12px;
    }

    .uc-content h2 {
        margin: 0 0 6px;
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .uc-content p {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .uc-policy-links {
        display: inline;
    }

    .uc-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
        align-items: stretch;
    }

    .uc-btn {
        width: 100%;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 0.875rem;
        border-radius: 8px;
        text-align: center;
        box-sizing: border-box;
    }

    #uc-btn-accept {
        grid-column: 1;
        grid-row: 1;
    }

    #uc-btn-reject {
        grid-column: 2;
        grid-row: 1;
        background: #fff !important;
        border: 1px solid var(--uc-primary) !important;
        color: var(--uc-primary) !important;
    }

    #uc-btn-settings,
    #uc-btn-save {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .uc-btn-link {
        background: transparent !important;
        border: none !important;
        color: var(--uc-primary) !important;
        text-decoration: underline;
        font-weight: 500;
        min-height: auto;
        padding: 6px 4px !important;
        box-shadow: none !important;
    }

    .uc-btn-secondary:hover {
        background: #f6f7f7 !important;
    }

    #uc-settings-panel {
        padding-top: 12px;
    }

    .uc-preferences-fab {
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 12px;
    }

    .uc-preferences-fab__btn {
        width: 44px;
        height: 44px;
    }
}

@media (min-width: 768px) {
    .uc-inner {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 16px 24px;
    }

    .uc-content {
        flex: 1 1 280px;
        min-width: 0;
    }

    .uc-actions {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    /* Acordeones a ancho completo debajo (no columna del medio) */
    #uc-settings-panel {
        flex: 1 1 100%;
        order: 3;
        margin-top: 4px;
        padding-top: 14px;
        border-top: 1px solid #e5e5e5;
        max-width: 100%;
    }

    /* Al personalizar: columna limpia */
    .uc-banner-wrapper:has(#uc-settings-panel:not(.uc-hidden)) .uc-inner,
    .uc-banner-wrapper.uc-banner--customizing .uc-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .uc-banner-wrapper:has(#uc-settings-panel:not(.uc-hidden)) .uc-content,
    .uc-banner-wrapper.uc-banner--customizing .uc-content {
        flex: 1 1 auto;
    }

    .uc-banner-wrapper:has(#uc-settings-panel:not(.uc-hidden)) .uc-actions,
    .uc-banner-wrapper.uc-banner--customizing .uc-actions {
        justify-content: flex-start;
        order: 4;
    }

    .uc-banner-wrapper:has(#uc-settings-panel:not(.uc-hidden)) #uc-settings-panel,
    .uc-banner-wrapper.uc-banner--customizing #uc-settings-panel {
        order: 3;
    }

    .uc-banner-wrapper {
        bottom: 24px !important;
        left: 24px !important;
        right: 24px !important;
        padding: 18px 22px !important;
    }
}

/* Tabla shortcode [unlimitcookie_tabla] */
.uc-cookies-table-wrap {
    margin: 1.5em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.uc-cookies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
    min-width: 640px;
}

.uc-cookies-table th,
.uc-cookies-table td {
    border: 1px solid #dcdcde;
    padding: 0.65em 0.75em;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.uc-cookies-table thead th {
    background: #f6f7f7;
    font-weight: 600;
}

.uc-cookies-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.uc-cookies-table-meta {
    margin-top: 0.5em;
    font-size: 0.85em;
    color: #646970;
}

.uc-cookies-table-empty {
    padding: 1em;
    border: 1px dashed #c3c4c7;
}

@media (max-width: 767px) {
    .uc-cookies-table {
        font-size: 0.82em;
        min-width: 560px;
    }
}

.uc-option {
    margin-bottom: 12px;
}

.uc-cookie-list {
    margin: 6px 0 0 28px;
    padding: 0;
    list-style: disc;
    font-size: 0.85em;
    color: #50575e;
    line-height: 1.45;
}

.uc-cookie-list li {
    margin: 2px 0;
}

.uc-cookie-list-empty {
    margin: 4px 0 0 28px;
    font-size: 0.8em;
    color: #8c8f94;
    font-style: italic;
}

/* Botón flotante de preferencias */
.uc-preferences-fab {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 99999;
}

.uc-preferences-fab__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    color: var(--uc-primary, #2271b1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.uc-preferences-fab__btn:hover,
.uc-preferences-fab__btn:focus {
    color: var(--uc-primary-hover, #1a5a8a);
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    outline: none;
}

.uc-cookie-icon {
    display: block;
    width: 28px;
    height: 28px;
    fill: currentColor;
}
