/* ============================================
   LGPD Consentimento v1.1 — Styles
   ============================================ */

.lgpd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99998;
    animation: lgpdFadeIn 0.2s ease;
}

.lgpd-modal {
    position: fixed;
    z-index: 99999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
    width: 92%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    box-sizing: border-box;
    animation: lgpdSlideIn 0.22s ease;
}

@keyframes lgpdFadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes lgpdSlideIn { from { opacity:0; transform:translate(-50%,-48%) } to { opacity:1; transform:translate(-50%,-50%) } }

/* ── Header ── */
.lgpd-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e8e8e8;
}
.lgpd-modal__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #111;
}
.lgpd-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #666;
    padding: 0 2px;
    transition: color 0.15s;
}
.lgpd-modal__close:hover { color: #111; }

/* ── Body ── */
.lgpd-modal__body {
    padding: 16px 20px;
}
.lgpd-modal__description {
    color: #444;
    line-height: 1.6;
    margin: 0;
}

/* ── Footer (buttons) ── */
.lgpd-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px 18px;
    border-top: 1px solid #e8e8e8;
}

/* ── Buttons ── */
.lgpd-btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.18s;
    white-space: nowrap;
    line-height: 1.4;
    font-family: inherit;
}
.lgpd-btn--primary {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}
.lgpd-btn--primary:hover {
    background: #1558c0;
    border-color: #1558c0;
}
.lgpd-btn--secondary {
    background: #fff;
    color: #333;
    border-color: #bbb;
}
.lgpd-btn--secondary:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #111;
}

/* ── Preference categories ── */
.lgpd-pref {
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    margin-top: 12px;
    overflow: hidden;
}
.lgpd-pref__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    background: #fafafa;
    user-select: none;
}
.lgpd-pref__header:hover { background: #f3f3f3; }
.lgpd-pref__title {
    font-weight: 600;
    font-size: 14px;
    color: #111;
}
.lgpd-pref__right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lgpd-always-active {
    font-size: 13px;
    color: #2e7d32;
    font-weight: 500;
}

/* ── Toggle ── */
.lgpd-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.lgpd-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.lgpd-toggle__slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.lgpd-toggle__slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.lgpd-toggle input:checked + .lgpd-toggle__slider { background: #e87b00; }
.lgpd-toggle input:checked + .lgpd-toggle__slider::before { transform: translateX(18px); }

/* ── Chevron ── */
.lgpd-chevron {
    font-size: 14px;
    color: #777;
    transition: transform 0.2s;
    margin-left: 2px;
    display: inline-block;
}
.lgpd-pref.is-open .lgpd-chevron { transform: rotate(180deg); }

/* ── Category description ── */
.lgpd-pref__desc {
    display: none;
    padding: 10px 14px 14px;
    border-top: 1px solid #e8e8e8;
    color: #555;
    line-height: 1.55;
    font-size: 13px;
    background: #fff;
}
.lgpd-pref.is-open .lgpd-pref__desc { display: block; }

/* ── Floating manage button ── */
.lgpd-manage-btn {
    position: fixed;
    bottom: 18px;
    left: 18px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    z-index: 99990;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
    transition: background 0.18s;
    font-family: inherit;
}
.lgpd-manage-btn:hover { background: #1558c0; }

/* ── Scrollbar ── */
.lgpd-modal::-webkit-scrollbar { width: 6px; }
.lgpd-modal::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .lgpd-modal { width: 96%; }
    .lgpd-modal__footer { flex-direction: column; }
    .lgpd-btn { text-align: center; width: 100%; box-sizing: border-box; }
}
