/* ═══════════════════════════════════════
   FluxIT GDPR v2 — Banner + Modal
═══════════════════════════════════════ */

/* ── Banner ── */
#fluxit-gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 32px;
    background: var(--fgdpr-bg, #ffffff);
    color: var(--fgdpr-text, #222222);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 -2px 12px rgba(0,0,0,.15);
    border-top: 1px solid #e0e0e0;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
#fluxit-gdpr-banner.fluxit-visible { transform: translateY(0); }

#fluxit-gdpr-banner p { margin: 0; flex: 1; font-size: 13px; }
#fluxit-gdpr-banner a { color: var(--fgdpr-link, #0057b8); text-decoration: underline; }
#fluxit-gdpr-banner a:hover { text-decoration: none; }

/* ── Banner action buttons ── */
.fluxit-gdpr-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.fluxit-gdpr-btn {
    cursor: pointer;
    border-radius: 2px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
    transition: opacity .15s, filter .15s;
    white-space: nowrap;
    line-height: 1;
}
.fluxit-gdpr-btn:hover { filter: brightness(.92); }
.fluxit-gdpr-btn:active { filter: brightness(.85); }

/* Settings button — outline style */
#fluxit-gdpr-settings {
    background: transparent;
    color: var(--fgdpr-reject-bg, #c8102e);
    border: 2px solid var(--fgdpr-reject-bg, #c8102e);
}

/* Reject All */
#fluxit-gdpr-reject {
    background: var(--fgdpr-reject-bg, #c8102e);
    color: #ffffff;
    border: 2px solid var(--fgdpr-reject-bg, #c8102e);
}

/* Accept All */
#fluxit-gdpr-accept {
    background: var(--fgdpr-accept-bg, #c8102e);
    color: var(--fgdpr-accept-color, #ffffff);
    border: 2px solid var(--fgdpr-accept-bg, #c8102e);
}

/* ── Reopen cookie button ── */
#fluxit-gdpr-reopen {
    position: fixed;
    bottom: 14px;
    left: 14px;
    z-index: 999998;
    background: var(--fgdpr-bg, #ffffff);
    color: var(--fgdpr-text, #222);
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    transition: transform .2s;
}
#fluxit-gdpr-reopen:hover { transform: scale(1.1); }
#fluxit-gdpr-reopen.fluxit-show { display: flex; }

/* ═══════════════════════════════════════
   MODAL — Privacy Preference Center
═══════════════════════════════════════ */
#fluxit-gdpr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000000;
    align-items: center;
    justify-content: center;
}
#fluxit-gdpr-overlay.fluxit-open { display: flex; }

#fluxit-gdpr-modal {
    background: #fff;
    border-radius: 4px;
    width: 560px;
    max-width: 96vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    overflow: hidden;
}

.fgdpr-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 22px 0;
    flex-shrink: 0;
}
.fgdpr-modal-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
#fluxit-gdpr-modal-close {
    background: none;
    border: 1px solid #ccc;
    width: 30px;
    height: 30px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #555;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
#fluxit-gdpr-modal-close:hover { background: #f0f0f0; }

.fgdpr-modal-body {
    padding: 14px 22px 10px;
    overflow-y: auto;
    flex: 1;
    color: #333;
    line-height: 1.6;
    font-size: 13px;
}
.fgdpr-modal-body p { margin: 0 0 14px; }

.fgdpr-allow-all-wrap { margin: 6px 0 18px; }
.fgdpr-allow-all {
    background: var(--fgdpr-accept-bg, #c8102e);
    color: #fff;
    border: none;
    border-radius: 2px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s;
}
.fgdpr-allow-all:hover { filter: brightness(.9); }

.fgdpr-manage-title {
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 10px;
    color: #1a1a1a;
}

/* Category rows */
.fgdpr-category {
    border: 1px solid #ddd;
    margin-bottom: -1px;
}
.fgdpr-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    background: #fff;
    transition: background .1s;
}
.fgdpr-category-row:hover { background: #f8f8f8; }
.fgdpr-cat-label { font-weight: 700; font-size: 13px; color: #1a1a1a; }

.fgdpr-cat-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Always Active badge */
.fgdpr-always-active {
    font-size: 12px;
    font-weight: 700;
    color: var(--fgdpr-link, #0057b8);
}

/* Toggle switch for categories */
.fgdpr-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.fgdpr-switch input { opacity: 0; width: 0; height: 0; }
.fgdpr-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #aaa;
    border-radius: 26px;
    transition: .25s;
}
.fgdpr-switch-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.fgdpr-switch input:checked + .fgdpr-switch-slider { background: #555; }
.fgdpr-switch input:checked + .fgdpr-switch-slider:before { transform: translateX(22px); }

/* Chevron */
.fgdpr-chevron {
    font-size: 11px;
    color: #aaa;
    transition: transform .2s;
}
.fgdpr-category.fgdpr-open .fgdpr-chevron { transform: rotate(90deg); }

/* Category details panel */
.fgdpr-cat-details {
    display: none;
    padding: 10px 16px 14px;
    background: #fafafa;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}
.fgdpr-category.fgdpr-open .fgdpr-cat-details { display: block; }

/* Modal footer */
.fgdpr-modal-foot {
    padding: 14px 22px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}
.fgdpr-confirm {
    background: var(--fgdpr-accept-bg, #c8102e);
    color: #fff;
    border: none;
    border-radius: 2px;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s;
}
.fgdpr-confirm:hover { filter: brightness(.9); }

/* ── Responsive ── */
@media (max-width: 640px) {
    #fluxit-gdpr-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 18px;
    }
    .fluxit-gdpr-actions { width: 100%; flex-direction: column; }
    .fluxit-gdpr-btn { text-align: center; }
}

/* Policy page */
.fluxit-gdpr-policy { max-width: 860px; }
.fluxit-gdpr-policy h2 { margin-top: 1.5em; }
.fluxit-gdpr-policy h3 { margin-top: 1.2em; }
