/* =========================
   Banner de cookies
   ========================= */
.ssc-banner {
    position: fixed;
    z-index: 999999;
    background: var(--ssc-bg, #ffffff);
    color: var(--ssc-text, #1f2937);
    box-shadow: 0 -2px 24px rgba(0, 0, 0, .18);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.ssc-banner[hidden] { display: none; }

.ssc-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.ssc-banner__content { flex: 1 1 380px; min-width: 260px; }
.ssc-banner__title { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: inherit; }
.ssc-banner__message { margin: 0 0 8px; color: inherit; }
.ssc-banner__links { margin: 0; font-size: 13px; }
.ssc-banner__links a { color: inherit; text-decoration: underline; }
.ssc-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Botones */
.ssc-btn {
    border: 0;
    border-radius: 6px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    transition: opacity .15s ease, transform .15s ease;
}
.ssc-btn:hover { opacity: .92; }
.ssc-btn:active { transform: translateY(1px); }
.ssc-btn--accept,
.ssc-btn--save {
    background: var(--ssc-btn-bg);
    color: var(--ssc-btn-text);
}
.ssc-btn--reject,
.ssc-btn--settings {
    background: var(--ssc-btn-reject-bg);
    color: var(--ssc-btn-reject-text);
}

/* Posiciones */
.ssc-pos-bottom { bottom: 0; left: 0; right: 0; }
.ssc-pos-top    { top: 0; left: 0; right: 0; box-shadow: 0 2px 24px rgba(0, 0, 0, .18); }
.ssc-pos-center {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    max-width: 540px;
    width: calc(100% - 32px);
    border-radius: 12px;
}
.ssc-pos-bottom-left,
.ssc-pos-bottom-right {
    bottom: 20px;
    max-width: 440px;
    border-radius: 12px;
}
.ssc-pos-bottom-left  { left: 20px; }
.ssc-pos-bottom-right { right: 20px; }
.ssc-pos-bottom-left .ssc-banner__inner,
.ssc-pos-bottom-right .ssc-banner__inner {
    flex-direction: column;
    align-items: stretch;
}

/* Backdrop solo en posición center */
.ssc-banner-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 999998;
}
.ssc-banner-backdrop[hidden] { display: none; }

/* =========================
   Modal de preferencias
   ========================= */
.ssc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ssc-modal[hidden] { display: none; }
.ssc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}
.ssc-modal__dialog {
    position: relative;
    background: var(--ssc-bg, #fff);
    color: var(--ssc-text, #1f2937);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.ssc-modal__header {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ssc-modal__header h2 { margin: 0; font-size: 18px; color: inherit; }
.ssc-modal__close {
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
    color: inherit;
    line-height: 1;
    padding: 0 6px;
    opacity: .7;
}
.ssc-modal__close:hover { opacity: 1; }
.ssc-modal__body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}
.ssc-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Categorías */
.ssc-cat {
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.ssc-cat:last-child { border-bottom: 0; }
.ssc-cat__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 12px;
}
.ssc-cat__desc { margin: 0; font-size: 13px; opacity: .8; }

/* Switch */
.ssc-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.ssc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.ssc-switch__slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #ccc;
    border-radius: 24px;
    transition: .25s;
}
.ssc-switch__slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .25s;
}
.ssc-switch input:checked + .ssc-switch__slider {
    background: var(--ssc-btn-bg, #2563eb);
}
.ssc-switch input:checked + .ssc-switch__slider::before {
    transform: translateX(20px);
}
.ssc-switch input:disabled + .ssc-switch__slider {
    opacity: .6;
    cursor: not-allowed;
}

/* Botón flotante */
.ssc-floating {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999990;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ssc-btn-bg, #2563eb);
    color: var(--ssc-btn-text, #fff);
    border: 0;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
}
.ssc-floating:hover { transform: scale(1.06); }
.ssc-floating[hidden] { display: none; }

/* Responsivo */
@media (max-width: 600px) {
    .ssc-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .ssc-banner__actions {
        flex-direction: column;
    }
    .ssc-btn { width: 100%; }
    .ssc-pos-bottom-left,
    .ssc-pos-bottom-right {
        left: 0;
        right: 0;
        bottom: 0;
        max-width: none;
        border-radius: 0;
    }
}

/* =========================
   Páginas legales (shortcodes)
   ========================= */
.ssc-legal { max-width: 900px; margin: 0 auto; }
.ssc-legal h2 { margin-top: 1.8em; }
.ssc-legal h3 { margin-top: 1.4em; }
.ssc-legal table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 14px;
}
.ssc-legal table th,
.ssc-legal table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    vertical-align: top;
    text-align: left;
}
.ssc-legal table th {
    background: #f4f6f8;
    font-weight: 600;
}
.ssc-legal .ssc-update {
    color: #777;
    font-style: italic;
    margin-top: 2em;
    font-size: 13px;
}
@media (max-width: 700px) {
    .ssc-legal table,
    .ssc-legal table thead,
    .ssc-legal table tbody,
    .ssc-legal table tr,
    .ssc-legal table th,
    .ssc-legal table td {
        display: block;
    }
    .ssc-legal table thead { display: none; }
    .ssc-legal table tr {
        border: 1px solid #ddd;
        margin-bottom: 12px;
        padding: 6px 0;
    }
    .ssc-legal table td {
        border: 0;
        border-bottom: 1px solid #eee;
        padding: 8px 12px;
    }
    .ssc-legal table td:last-child { border-bottom: 0; }
}
