/* BEasy RGPD – Banner & preferences modal */

:root {
    --b-easy-rgpd-accent: #0066cc;
}

.b-easy-rgpd-banner,
.b-easy-rgpd-modal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #111827;
    box-sizing: border-box;
}

.b-easy-rgpd-banner *,
.b-easy-rgpd-modal * {
    box-sizing: border-box;
}

/* ── Banner ────────────────────────────────────────────── */

.b-easy-rgpd-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -10px 25px rgba(0,0,0,.08);
    padding: 18px 22px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    animation: b-easy-rgpd-slide-up .35s ease-out;
}

@keyframes b-easy-rgpd-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

.b-easy-rgpd-banner.is-position-bottom-left  { left: 20px;  right: auto; max-width: 420px; border-radius: 12px; border: 1px solid #e5e7eb; bottom: 20px; grid-template-columns: 1fr; }
.b-easy-rgpd-banner.is-position-bottom-right { right: 20px; left: auto;  max-width: 420px; border-radius: 12px; border: 1px solid #e5e7eb; bottom: 20px; grid-template-columns: 1fr; }

.b-easy-rgpd-banner__text { min-width: 0; }
.b-easy-rgpd-banner__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}
.b-easy-rgpd-banner__body {
    margin: 0;
    font-size: 14px;
    color: #374151;
}
.b-easy-rgpd-banner__body a {
    color: var(--b-easy-rgpd-accent);
    text-decoration: underline;
}

.b-easy-rgpd-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.b-easy-rgpd-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .08s, filter .15s, background-color .15s, color .15s;
    line-height: 1.2;
    min-width: 130px;
    text-align: center;
}

.b-easy-rgpd-btn:focus-visible {
    outline: 3px solid var(--b-easy-rgpd-accent);
    outline-offset: 2px;
}

.b-easy-rgpd-btn--primary {
    background: var(--b-easy-rgpd-accent);
    color: #ffffff;
}
.b-easy-rgpd-btn--primary:hover { filter: brightness(1.08); }

.b-easy-rgpd-btn--secondary {
    background: #f3f4f6;
    color: #111827;
    border-color: #d1d5db;
}
.b-easy-rgpd-btn--secondary:hover { background: #e5e7eb; }

.b-easy-rgpd-btn--ghost {
    background: transparent;
    color: var(--b-easy-rgpd-accent);
    border-color: var(--b-easy-rgpd-accent);
}
.b-easy-rgpd-btn--ghost:hover {
    background: var(--b-easy-rgpd-accent);
    color: #ffffff;
}

/* ── Modal de preferencias ─────────────────────────────── */

.b-easy-rgpd-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: b-easy-rgpd-fade .2s ease-out;
}

@keyframes b-easy-rgpd-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.b-easy-rgpd-modal__dialog {
    background: #ffffff;
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    max-height: min(90vh, 780px);
    overflow: auto;
    box-shadow: 0 18px 40px rgba(0,0,0,.25);
    padding: 26px 28px;
    position: relative;
}

.b-easy-rgpd-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: 0;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color .15s, background-color .15s;
}
.b-easy-rgpd-modal__close:hover,
.b-easy-rgpd-modal__close:focus-visible {
    color: #111827;
    background: #f3f4f6;
}
.b-easy-rgpd-modal__close:focus-visible {
    outline: 3px solid var(--b-easy-rgpd-accent);
    outline-offset: 2px;
}

.b-easy-rgpd-modal__title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
}

.b-easy-rgpd-modal__intro {
    margin: 0 0 18px;
    font-size: 14px;
    color: #4b5563;
}

.b-easy-rgpd-category {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.b-easy-rgpd-category__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.b-easy-rgpd-category__name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.b-easy-rgpd-category__desc {
    margin: 8px 0 0;
    font-size: 13px;
    color: #4b5563;
}

.b-easy-rgpd-category__always {
    font-size: 12px;
    font-weight: 600;
    color: #047857;
    background: #d1fae5;
    padding: 4px 10px;
    border-radius: 999px;
}

/* Toggle */
.b-easy-rgpd-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.b-easy-rgpd-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.b-easy-rgpd-toggle__slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s;
}
.b-easy-rgpd-toggle__slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.b-easy-rgpd-toggle input:checked + .b-easy-rgpd-toggle__slider {
    background: var(--b-easy-rgpd-accent);
}
.b-easy-rgpd-toggle input:checked + .b-easy-rgpd-toggle__slider::before {
    transform: translateX(20px);
}
.b-easy-rgpd-toggle input:disabled + .b-easy-rgpd-toggle__slider {
    opacity: .65;
    cursor: not-allowed;
}

.b-easy-rgpd-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

/* Cookie settings shortcode button */
.b-easy-rgpd-cookie-settings {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--b-easy-rgpd-accent);
    color: #ffffff !important;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    border: 0;
}

.b-easy-rgpd-cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}
.b-easy-rgpd-cookie-table th,
.b-easy-rgpd-cookie-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}
.b-easy-rgpd-cookie-table thead th {
    background: #f9fafb;
    font-weight: 700;
}
.b-easy-rgpd-cookie-table code {
    font-size: 13px;
    background: #f3f4f6;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 720px) {
    .b-easy-rgpd-banner {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .b-easy-rgpd-banner__actions {
        justify-content: stretch;
    }
    .b-easy-rgpd-btn {
        flex: 1 1 auto;
        min-width: 0;
        padding: 12px 14px;
    }
    .b-easy-rgpd-modal__dialog {
        padding: 20px 18px;
    }
}

/* Third-party embed placeholder (YouTube, etc.) when consent missing */
.b-easy-rgpd-embed-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f3f4f6;
    border: 1px dashed #9ca3af;
    border-radius: 10px;
    padding: 30px 20px;
    color: #374151;
    text-align: center;
    aspect-ratio: 16 / 9;
}
.b-easy-rgpd-embed-placeholder small {
    color: #6b7280;
    font-size: 12px;
}

/* Screen-reader-only utility */
.b-easy-rgpd-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
