/* ============================================================
   BFD GDPR Cookie Consent — frontend styles
   Tudo escopado em #bfd-gdpr-* para não vazar globalmente
   ============================================================ */

#bfd-gdpr-banner,
#bfd-gdpr-overlay {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    box-sizing: border-box;
}

#bfd-gdpr-banner *,
#bfd-gdpr-overlay * {
    box-sizing: border-box;
}

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

#bfd-gdpr-banner {
    position: fixed;
    z-index: 999990;
    background: var(--gdpr-bg, #1a1a2e);
    color: var(--gdpr-text, #fff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 32px;
    transition: transform .35s ease, opacity .35s ease;
}

/* posições */
#bfd-gdpr-banner.gdpr-pos-bottom-bar {
    bottom: 0; left: 0; right: 0;
    border-top: 3px solid var(--gdpr-accent, #0066cc);
}
#bfd-gdpr-banner.gdpr-pos-top-bar {
    top: 0; left: 0; right: 0;
    border-bottom: 3px solid var(--gdpr-accent, #0066cc);
}
#bfd-gdpr-banner.gdpr-pos-bottom-left {
    bottom: 24px; left: 24px;
    max-width: 440px;
    border-radius: 10px;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 24px;
    border-left: 4px solid var(--gdpr-accent, #0066cc);
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
#bfd-gdpr-banner.gdpr-pos-bottom-right {
    bottom: 24px; right: 24px;
    max-width: 440px;
    border-radius: 10px;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 24px;
    border-left: 4px solid var(--gdpr-accent, #0066cc);
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

/* estado oculto */
#bfd-gdpr-banner.gdpr-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    visibility: hidden;
}
#bfd-gdpr-banner.gdpr-pos-top-bar.gdpr-hidden {
    transform: translateY(-16px);
}

/* conteúdo */
.gdpr-banner__content { flex: 1; min-width: 0; }

.gdpr-banner__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.gdpr-banner__text {
    font-size: 14px;
    margin: 0 0 8px;
    opacity: .92;
}
.gdpr-banner__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gdpr-banner__text a:hover { opacity: .8; }

/* ações */
.gdpr-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

/* ── Botões ─────────────────────────────────────────────────────────────── */

.gdpr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    transition: opacity .15s, transform .1s, box-shadow .15s;
    line-height: 1;
    text-decoration: none;
}
.gdpr-btn:hover  { opacity: .88; }
.gdpr-btn:active { transform: scale(.97); }

.gdpr-btn--accept {
    background: var(--gdpr-accent, #0066cc);
    color: var(--gdpr-acc-txt, #fff);
    box-shadow: 0 2px 8px rgba(0,102,204,.3);
}
.gdpr-btn--accept:hover { box-shadow: 0 4px 14px rgba(0,102,204,.4); }

.gdpr-btn--outline {
    background: transparent;
    color: var(--gdpr-text, #fff);
    border-color: rgba(255,255,255,.45);
}
.gdpr-btn--outline:hover { border-color: rgba(255,255,255,.8); }

/* botões secundários dentro do modal (fundo claro) */
.gdpr-modal .gdpr-btn--outline {
    color: #333;
    border-color: #ccc;
}
.gdpr-modal .gdpr-btn--outline:hover { border-color: #888; }

/* ── Overlay + Modal ────────────────────────────────────────────────────── */

#bfd-gdpr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity .25s ease;
}
#bfd-gdpr-overlay.gdpr-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.gdpr-modal {
    background: #fff;
    color: #222;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    animation: gdprSlideUp .28s ease;
}

@keyframes gdprSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.gdpr-modal__header {
    padding: 20px 24px 14px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.gdpr-modal__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1a1a2e;
}
.gdpr-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #aaa;
    padding: 0 2px;
    transition: color .15s;
}
.gdpr-modal__close:hover { color: #333; }

.gdpr-modal__body {
    padding: 8px 24px 4px;
    overflow-y: auto;
    flex: 1;
}

.gdpr-modal__footer {
    padding: 14px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Categorias ─────────────────────────────────────────────────────────── */

.gdpr-category {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}
.gdpr-category:last-child { border-bottom: none; }

.gdpr-category__info { flex: 1; }

.gdpr-category__name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.gdpr-category__badge {
    font-size: 11px;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.gdpr-category__desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ── Toggle switch ──────────────────────────────────────────────────────── */

.gdpr-toggle {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 2px;
}
.gdpr-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.gdpr-toggle__track {
    position: absolute;
    inset: 0;
    background: #d0d0d0;
    border-radius: 26px;
    cursor: pointer;
    transition: background .2s;
}
.gdpr-toggle__track::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.22);
}
.gdpr-toggle input:checked  + .gdpr-toggle__track { background: var(--gdpr-accent, #0066cc); }
.gdpr-toggle input:checked  + .gdpr-toggle__track::after { transform: translateX(20px); }
.gdpr-toggle input:disabled + .gdpr-toggle__track { opacity: .55; cursor: not-allowed; }

/* ── Responsivo ─────────────────────────────────────────────────────────── */

@media (max-width: 620px) {
    #bfd-gdpr-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
    }
    #bfd-gdpr-banner.gdpr-pos-bottom-left,
    #bfd-gdpr-banner.gdpr-pos-bottom-right {
        left: 10px; right: 10px; bottom: 10px;
        max-width: none;
    }
    .gdpr-banner__actions { width: 100%; }
    .gdpr-banner__actions .gdpr-btn { flex: 1; text-align: center; }

    .gdpr-modal { max-height: 95vh; border-radius: 10px 10px 0 0; }
    #bfd-gdpr-overlay { align-items: flex-end; padding: 0; }
    .gdpr-modal__footer { flex-direction: column; }
    .gdpr-modal__footer .gdpr-btn { width: 100%; justify-content: center; }
}
