/* =========================================================
   BRAYZ — PRIVACY / ANALYTICS CONSENT
   ========================================================= */

:root {
    --consent-accent: #d84a43;
    --consent-bg: rgba(20, 20, 21, 0.94);
    --consent-panel: #171718;
    --consent-line: rgba(255, 255, 255, 0.12);
    --consent-text: #f4f4f2;
    --consent-muted: #a0a0a0;
}

.brayz-consent,
.brayz-consent * {
    box-sizing: border-box;
}

.brayz-consent {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 100000;
    width: min(560px, calc(100vw - 40px));
    padding: 22px 24px 18px;
    overflow: hidden;

    border: 1px solid var(--consent-line);
    border-radius: 18px;

    background: var(--consent-bg);
    color: var(--consent-text);

    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.36),
        0 4px 18px rgba(0, 0, 0, 0.24);

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

    font-family:
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif;

    transform: translateY(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        visibility 0.28s ease;
}

.brayz-consent::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--consent-accent) 0%,
        var(--consent-accent) 30%,
        rgba(216, 74, 67, 0.24) 72%,
        transparent 100%
    );
}

.brayz-consent.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.brayz-consent-label,
.brayz-consent-modal-label {
    margin: 0 0 12px;
    color: var(--consent-accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.brayz-consent h2,
.brayz-consent-modal h2 {
    margin: 0;
    color: var(--consent-text);
    font-size: 29px;
    font-weight: 750;
    line-height: 0.98;
    letter-spacing: -1.2px;
    text-transform: uppercase;
}

.brayz-consent-copy {
    margin: 13px 0 0;
    color: var(--consent-muted);
    font-size: 13px;
    line-height: 1.62;
}

.brayz-consent-copy strong {
    color: var(--consent-text);
    font-weight: 600;
}

.brayz-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 18px;
}

.brayz-consent-button {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0;
    background: transparent;
    color: #ffffff;

    font: inherit;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;

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

.brayz-consent-button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.42);
}

.brayz-consent-button-primary {
    border-color: var(--consent-accent);
    background: var(--consent-accent);
    color: #ffffff;
}

.brayz-consent-button-primary:hover {
    border-color: #e45851;
    background: #e45851;
}

.brayz-consent-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 13px;
}

.brayz-consent-text-button,
.brayz-consent-privacy-link {
    padding: 0;
    border: 0;
    background: none;
    color: #8f8f91;
    font: inherit;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.25px;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

.brayz-consent-text-button:hover,
.brayz-consent-privacy-link:hover {
    color: #ffffff;
}

/* ---------- Settings modal ---------- */

.brayz-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: grid;
    place-items: center;
    padding: 22px;

    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);

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

    transition:
        opacity 0.24s ease,
        visibility 0.24s ease;
}

.brayz-consent-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.brayz-consent-modal {
    position: relative;
    width: min(590px, 100%);
    max-height: min(720px, calc(100vh - 44px));
    overflow: auto;
    padding: 31px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #111113;
    color: #ffffff;

    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.48);

    font-family:
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif;

    transform: scale(0.98) translateY(8px);
    transition: transform 0.24s ease;
}

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

.brayz-consent-modal-close {
    position: absolute;
    top: 21px;
    right: 21px;

    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #ffffff;

    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.brayz-consent-modal-intro {
    max-width: 470px;
    margin: 16px 0 27px;
    color: #9b9b9e;
    font-size: 13px;
    line-height: 1.65;
}

.brayz-consent-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.brayz-consent-option:last-of-type {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.brayz-consent-option-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.15px;
    text-transform: uppercase;
}

.brayz-consent-option-badge {
    color: #8d8d90;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.brayz-consent-option p {
    max-width: 440px;
    margin: 7px 0 0;
    color: #8f8f92;
    font-size: 12px;
    line-height: 1.55;
}

.brayz-consent-always {
    color: var(--consent-accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

/* custom switch */
.brayz-consent-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex: 0 0 auto;
}

.brayz-consent-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.brayz-consent-switch-track {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #272729;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.brayz-consent-switch-track::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    background: #8d8d90;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.brayz-consent-switch input:checked + .brayz-consent-switch-track {
    border-color: var(--consent-accent);
    background: rgba(216, 74, 67, 0.18);
}

.brayz-consent-switch input:checked + .brayz-consent-switch-track::after {
    transform: translateX(22px);
    background: var(--consent-accent);
}

.brayz-consent-switch input:focus-visible + .brayz-consent-switch-track {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.brayz-consent-modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 25px;
}

.brayz-consent-modal-note {
    margin: 18px 0 0;
    color: #77777a;
    font-size: 10px;
    line-height: 1.55;
}

.brayz-consent-modal-note a {
    color: #a9a9ac;
}

/* ---------- footer settings button ---------- */

.footer-cookie-settings {
    padding: 0;
    border: 0;
    background: transparent;
    color: #777777;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
}

.footer-cookie-settings:hover {
    color: #ffffff;
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
    .brayz-consent {
        right: 14px;
        bottom: 14px;
        width: calc(100vw - 28px);
        padding: 22px 20px 18px;
        border-radius: 14px;
    }

    .brayz-consent h2 {
        font-size: 25px;
    }

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

    .brayz-consent-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .brayz-consent-overlay {
        align-items: end;
        padding: 0;
    }

    .brayz-consent-modal {
        width: 100%;
        max-height: 88vh;
        padding: 29px 21px 25px;
        border-width: 1px 0 0;
    }

    .brayz-consent-modal h2 {
        padding-right: 42px;
        font-size: 27px;
    }

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

@media (prefers-reduced-motion: reduce) {
    .brayz-consent,
    .brayz-consent-overlay,
    .brayz-consent-modal,
    .brayz-consent-button,
    .brayz-consent-switch-track,
    .brayz-consent-switch-track::after {
        transition: none !important;
    }
}
