/* =========================================================
   DIGITAL PROFILE — PREMIUM SAAS PRIVACY CONSENT
   Refined glass / SaaS UI
========================================================= */

/* =========================================================
   PRIVACY CONSENT OVERLAY
========================================================= */

.privacy-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding: 24px;

    pointer-events: none;
}

.privacy-consent-overlay.is-hidden {
    display: none;
}


/* =========================================================
   MAIN BANNER
========================================================= */

.privacy-consent-modal {
    position: relative;
    width: min(100%, 1080px);

    background:
        linear-gradient(
            145deg,
            rgba(15, 18, 28, 0.98),
            rgba(7, 9, 15, 0.97)
        );

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.42),
        0 8px 30px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    overflow: hidden;

    pointer-events: auto;

    animation: privacyBannerIn 0.4s cubic-bezier(.22, 1, .36, 1);
}

.privacy-consent-modal::before {
    content: "";
    position: absolute;
    top: -120px;
    right: 8%;
    width: 280px;
    height: 220px;

    background: rgba(37, 99, 235, 0.12);
    filter: blur(70px);
    pointer-events: none;
}

@keyframes privacyBannerIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   ACCENT
========================================================= */

.privacy-consent-accent {
    position: relative;
    height: 3px;

    background:
        linear-gradient(
            90deg,
            #2563eb 0%,
            #6366f1 48%,
            #f97316 100%
        );

    box-shadow:
        0 0 24px rgba(37, 99, 235, 0.35);
}


/* =========================================================
   INNER
========================================================= */

.privacy-consent-inner {
    position: relative;
    padding: 28px 32px 25px;
}


/* =========================================================
   BRAND
========================================================= */

.privacy-consent-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 17px;
}

.privacy-consent-icon {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 13px;

    background:
        linear-gradient(
            145deg,
            rgba(37, 99, 235, 0.16),
            rgba(99, 102, 241, 0.08)
        );

    color: #60a5fa;
    font-size: 17px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.privacy-consent-label {
    display: block;
    margin-bottom: 4px;

    color: #60a5fa;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.8px;
    line-height: 1.2;
    text-transform: uppercase;
}

.privacy-consent-heading h2 {
    margin: 0;

    color: #ffffff;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.025em;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.privacy-consent-description {
    max-width: 850px;
    margin: 0 0 19px;

    color: rgba(226, 232, 240, 0.78);
    font-size: 13px;
    line-height: 1.75;
}


/* =========================================================
   STATUS
========================================================= */

.privacy-consent-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;

    margin-bottom: 17px;
}

.privacy-status-item {
    min-height: 43px;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 10px 13px;

    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 12px;

    color: rgba(226, 232, 240, 0.76);
    font-size: 11px;

    transition:
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.privacy-status-item:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

.privacy-status-item strong {
    margin-left: auto;

    color: rgba(255, 255, 255, 0.46);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .2px;
}

.privacy-status-dot {
    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-radius: 50%;

    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.025);
}

.necessary-dot {
    background: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.45);
}

.analytics-dot {
    background: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.45);
}

.advertising-dot {
    background: #fb923c;
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.42);
}


/* =========================================================
   LINKS
========================================================= */

.privacy-consent-links {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 20px;
}

.privacy-consent-links a {
    color: #93c5fd;
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;

    transition:
        color .2s ease,
        opacity .2s ease;
}

.privacy-consent-links a:hover {
    color: #ffffff;
    text-decoration: none;
}

.privacy-consent-links span {
    color: rgba(255, 255, 255, 0.20);
    font-size: 10px;
}


/* =========================================================
   ACTIONS
========================================================= */

.privacy-consent-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;

    padding-top: 17px;

    border-top: 1px solid rgba(255, 255, 255, 0.075);
}


/* =========================================================
   BUTTON BASE
========================================================= */

.privacy-btn {
    min-height: 41px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 17px;

    border-radius: 10px;
    border: 1px solid transparent;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .01em;

    cursor: pointer;

    transition:
        transform .2s cubic-bezier(.22, 1, .36, 1),
        box-shadow .2s ease,
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.privacy-btn:hover {
    transform: translateY(-1px);
}

.privacy-btn:active {
    transform: translateY(0);
}

.privacy-btn:focus-visible,
.privacy-consent-links a:focus-visible,
.privacy-preferences-close:focus-visible,
.privacy-toggle input:focus-visible + .privacy-toggle-track {
    outline: 2px solid rgba(96, 165, 250, 0.9);
    outline-offset: 3px;
}


/* =========================================================
   SECONDARY BUTTONS
========================================================= */

.privacy-btn-settings,
.privacy-btn-secondary {
    background: rgba(255, 255, 255, 0.045);
    color: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 255, 255, 0.10);
}

.privacy-btn-settings:hover,
.privacy-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.17);
    color: #ffffff;
}


/* =========================================================
   PRIMARY BUTTON
========================================================= */

.privacy-btn-primary {
        background: linear-gradient(135deg, #2563eb, #4f46e500);

    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.18);

    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.privacy-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e500);

    border-color: rgba(147, 197, 253, 0.28);

    box-shadow:
        0 11px 30px rgba(37, 99, 235, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}


/* =========================================================
   PREFERENCES OVERLAY
========================================================= */

.privacy-preferences-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(2, 6, 23, 0.64);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.privacy-preferences-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   PREFERENCES MODAL
========================================================= */

.privacy-preferences-modal {
    position: relative;

    width: min(100%, 650px);
    max-height: min(90vh, 760px);

    overflow-y: auto;

    background:
        linear-gradient(
            145deg,
            #11151f,
            #090c13
        );

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;

    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.055);

    padding: 28px;

    transform: translateY(14px) scale(.975);

    transition:
        transform .28s cubic-bezier(.22, 1, .36, 1);
}

.privacy-preferences-modal::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -70px;

    width: 220px;
    height: 180px;

    background: rgba(99, 102, 241, 0.10);
    filter: blur(65px);

    pointer-events: none;
}

.privacy-preferences-overlay.is-visible
.privacy-preferences-modal {
    transform: translateY(0) scale(1);
}


/* =========================================================
   PREFERENCES HEADER
========================================================= */

.privacy-preferences-header {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding-bottom: 18px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.privacy-preferences-header h2 {
    margin: 0;

    color: #ffffff;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.privacy-preferences-close {
    width: 37px;
    height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.58);

    cursor: pointer;
    font-size: 15px;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.privacy-preferences-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.17);
    transform: rotate(2deg);
}


/* =========================================================
   PREFERENCES DESCRIPTION
========================================================= */

.privacy-preferences-description {
    position: relative;
    z-index: 1;

    margin: 18px 0;

    color: rgba(226, 232, 240, 0.66);
    font-size: 12px;
    line-height: 1.75;
}


/* =========================================================
   PREFERENCE ITEM
========================================================= */

.privacy-preference-item {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;

    padding: 17px 0;

    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.privacy-preference-item:last-of-type {
    border-bottom: 0;
}

.privacy-preference-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;

    font-size: 15px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.privacy-preference-icon.necessary {
    background: rgba(16, 185, 129, 0.09);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.13);
}

.privacy-preference-icon.analytics {
    background: rgba(37, 99, 235, 0.09);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.13);
}

.privacy-preference-icon.advertising {
    background: rgba(249, 115, 22, 0.09);
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.13);
}


/* =========================================================
   PREFERENCE CONTENT
========================================================= */

.privacy-preference-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 5px;

    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 700;
}

.privacy-preference-content p {
    margin: 0;

    color: rgba(226, 232, 240, 0.56);
    font-size: 11px;
    line-height: 1.65;
}


/* =========================================================
   BADGES
========================================================= */

.privacy-required,
.privacy-optional {
    display: inline-flex;
    align-items: center;

    min-height: 20px;
    padding: 0 7px;

    border-radius: 6px;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.privacy-required {
    background: rgba(16, 185, 129, 0.10);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.12);
}

.privacy-optional {
    background: rgba(148, 163, 184, 0.08);
    color: rgba(226, 232, 240, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.06);
}


/* =========================================================
   TOGGLE
========================================================= */

.privacy-toggle {
    position: relative;

    display: inline-flex;

    width: 46px;
    height: 26px;

    flex-shrink: 0;

    cursor: pointer;
}

.privacy-toggle input {
    position: absolute;

    opacity: 0;

    width: 1px;
    height: 1px;
}

.privacy-toggle-track {
    position: absolute;
    inset: 0;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;

    background: rgba(148, 163, 184, 0.20);

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.privacy-toggle-thumb {
    position: absolute;

    width: 20px;
    height: 20px;

    top: 2px;
    left: 2px;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, 0.35);

    transition:
        transform .2s cubic-bezier(.22, 1, .36, 1);
}

.privacy-toggle input:checked
+ .privacy-toggle-track {
    background: #2563eb;
    border-color: rgba(96, 165, 250, 0.40);

    box-shadow:
        0 0 14px rgba(37, 99, 235, 0.18);
}

.privacy-toggle input:checked
+ .privacy-toggle-track
.privacy-toggle-thumb {
    transform: translateX(20px);
}

.privacy-toggle.disabled {
    opacity: 0.65;
    cursor: not-allowed;
}


/* =========================================================
   PREFERENCES FOOTER
========================================================= */

.privacy-preferences-footer {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding-top: 20px;
}

.privacy-preferences-footer a {
    color: #93c5fd;
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;

    transition: color .2s ease;
}

.privacy-preferences-footer a:hover {
    color: #ffffff;
    text-decoration: none;
}


/* =========================================================
   ALWAYS-ON NECESSARY TOGGLE
========================================================= */

.privacy-toggle-always-on {
    cursor: not-allowed;
}

.privacy-toggle-always-on
.privacy-toggle-track {
    background: rgba(16, 185, 129, 0.20);
    border-color: rgba(52, 211, 153, 0.22);
}

.privacy-toggle-always-on
.privacy-toggle-thumb {
    transform: translateX(20px);
}


/* =========================================================
   CUSTOM SCROLLBAR
========================================================= */

.privacy-preferences-modal::-webkit-scrollbar {
    width: 7px;
}

.privacy-preferences-modal::-webkit-scrollbar-track {
    background: transparent;
}

.privacy-preferences-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.privacy-preferences-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.20);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .privacy-consent-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .privacy-consent-modal {
        border-radius: 18px;
    }

    .privacy-consent-inner {
        padding: 21px;
    }

    .privacy-consent-status {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .privacy-status-item {
        white-space: normal;
    }

    .privacy-consent-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .privacy-btn-settings {
        grid-column: 1 / -1;
    }

    .privacy-btn {
        width: 100%;
    }

    .privacy-preferences-overlay {
        padding: 10px;
    }

    .privacy-preferences-modal {
        max-height: 92vh;
        padding: 21px;
        border-radius: 18px;
    }

    .privacy-preference-item {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 11px;
    }

    .privacy-preference-icon {
        width: 38px;
        height: 38px;
    }

    .privacy-preferences-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .privacy-preferences-footer a {
        text-align: center;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .privacy-consent-overlay {
        padding: 8px;
    }

    .privacy-consent-inner {
        padding: 18px;
    }

    .privacy-consent-brand {
        gap: 11px;
        margin-bottom: 15px;
    }

    .privacy-consent-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 15px;
    }

    .privacy-consent-heading h2 {
        font-size: 18px;
    }

    .privacy-consent-description {
        font-size: 12px;
        line-height: 1.7;
    }

    .privacy-consent-actions {
        grid-template-columns: 1fr;
    }

    .privacy-btn-settings {
        grid-column: auto;
    }

    .privacy-preferences-modal {
        padding: 18px;
    }

    .privacy-preferences-header h2 {
        font-size: 19px;
    }

    .privacy-preference-item {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .privacy-preference-item .privacy-toggle {
        grid-column: 2;
        justify-self: start;
        margin-top: 8px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .privacy-consent-modal,
    .privacy-preferences-modal,
    .privacy-btn,
    .privacy-status-item,
    .privacy-toggle-track,
    .privacy-toggle-thumb,
    .privacy-preferences-close {
        animation: none !important;
        transition: none !important;
    }
}
