﻿/* ===== Policy / Consent page — brand palette (same classes, no HTML change) ===== */
:root {
    --rg: #D6336C;
    --rg-lt: #EC6B9C;
    --rg-dk: #A02458;
    --rg-soft: #FDE8F0;
    --gd: #6C4BA6;
    --gd-lt: #9B7ECF;
    --gd-dk: #4A3278;
    --gd-soft: #EDE4F8;
    --tx-l: #180F1D;
    --tx-m: #3B2D45;
    --mt-l: #6B5A70;
    --mt-xl: #A595AD;
    --bg: #FBF6FD;
    --soft: #F5EDF8;
    --line: #EADFEE;
    --grad: linear-gradient(135deg,#D6336C,#6C4BA6);
    --ok: #178A4C;
    --err: #C62828;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Roboto,"Segoe UI",sans-serif;
    background: #fff;
    color: var(--tx-m);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Wrapper ---------- */
.policy-wrapper {
    margin: 40px auto;
    padding: 44px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 18px 44px -28px rgba(108,75,166,.28);
}

/* ---------- Header ---------- */
.policy-header-light {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: 32px 22px;
    text-align: center;
    background: linear-gradient(135deg,#FDE8F0 0%,#F5EDF8 55%,#EDE4F8 100%);
    border: 1px solid var(--line);
    border-radius: 16px;
}

    .policy-header-light:before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 3px;
        background: var(--grad);
    }

    .policy-header-light h1 {
        margin: 0 0 8px;
        font-size: 32px;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -.01em;
        background: var(--grad);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: var(--rg);
    }

    .policy-header-light p {
        margin: 0;
        font-size: 14px;
        color: var(--mt-l);
    }

/* ---------- Typography ---------- */
.policy-wrapper h1 {
    margin-bottom: 10px;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--tx-l);
}

.policy-wrapper h2 {
    margin: 26px 0 10px;
    padding-left: 14px;
    position: relative;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tx-l);
}

    .policy-wrapper h2:before {
        content: "";
        position: absolute;
        left: 0;
        top: 4px;
        bottom: 4px;
        width: 4px;
        border-radius: 4px;
        background: var(--grad);
    }

.policy-wrapper h3 {
    margin: 20px 0 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gd-dk);
}

.policy-wrapper h2, .policy-wrapper h3 {
    scroll-margin-top: 110px;
}

.policy-wrapper p, .policy-wrapper li {
    font-size: 15px;
    line-height: 1.85;
    color: var(--tx-m);
}

.policy-wrapper p {
    margin-bottom: 12px;
}

.policy-wrapper ul {
    padding-left: 4px;
}

    .policy-wrapper ul li {
        position: relative;
        margin-bottom: 8px;
        padding-left: 24px;
        list-style: none !important;
    }

        .policy-wrapper ul li:before {
            content: "";
            position: absolute;
            left: 4px;
            top: .7em;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--grad);
        }

.policy-wrapper a {
    color: var(--rg);
    font-weight: 500;
}

    .policy-wrapper a:hover {
        color: var(--rg-dk);
    }

/* ---------- Table of contents ---------- */
.toc {
    position: sticky;
    top: 100px;
    padding: 22px 20px;
    background: linear-gradient(180deg,#FBF6FD,#F5EDF8);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.policy-wrapper .toc ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

    .policy-wrapper .toc ul li {
        margin-bottom: 4px;
        padding-left: 0;
        font-size: 14px;
        line-height: 1.4;
    }

        .policy-wrapper .toc ul li:before {
            display: none;
        }

.toc a {
    display: block;
    padding: 7px 12px;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    color: var(--mt-l);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: .2s;
}

    .toc a:hover, .toc a.active {
        color: var(--rg-dk);
        background: #fff;
        border-left-color: var(--rg);
        text-decoration: none;
    }

/* ---------- Consent footer inside the policy ---------- */
.policy-consent-footer {
    margin-top: 40px;
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg,#FDE8F0,#F5EDF8);
    border: 1px solid var(--line);
    border-radius: 16px;
}

    .policy-consent-footer p {
        margin-bottom: 15px;
        font-size: 14px;
        color: var(--tx-m);
    }

.consent-action {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.consent-message {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
}

.consent-success {
    color: var(--ok);
}

.consent-error {
    color: var(--err);
}

/* ---------- Buttons ---------- */
.btn-consent {
    min-width: 145px;
    padding: 11px 26px;
    margin: 0 6px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--tx-m);
    background: var(--soft);
    transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}

    .btn-consent:hover {
        transform: translateY(-1px);
    }

    .btn-consent:focus-visible {
        outline: 3px solid rgba(214,51,108,.3);
        outline-offset: 2px;
    }

    .btn-consent:last-child {
        background: var(--grad);
        color: #fff;
        box-shadow: 0 10px 20px -10px rgba(214,51,108,.6);
    }

        .btn-consent:last-child:hover {
            box-shadow: 0 14px 24px -10px rgba(214,51,108,.7);
        }

    .btn-consent.agree-btn, .agree-btn {
        background: var(--rg-soft);
        color: var(--rg-dk);
        border: 1px solid rgba(214,51,108,.3);
        box-shadow: none;
    }

        .agree-btn:hover {
            background: #fbd5e5;
            box-shadow: 0 6px 14px rgba(214,51,108,.18);
        }

    .btn-consent.disagree-btn, .disagree-btn {
        background: #fff;
        color: var(--mt-l);
        border: 1px solid var(--line);
        box-shadow: none;
    }

        .btn-consent.disagree-btn:hover, .disagree-btn:hover {
            background: var(--soft);
            color: var(--tx-l);
            box-shadow: 0 6px 12px rgba(74,50,120,.08);
        }

/* ---------- Modal ---------- */
.modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 30px 70px -20px rgba(74,50,120,.45);
}

.consent-header {
    position: relative;
    padding: 22px 30px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg,#FDE8F0,#F5EDF8);
}

    .consent-header:before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 3px;
        background: var(--grad);
    }

    .consent-header h4 {
        margin: 0;
        font-size: 24px;
        font-weight: 700;
        line-height: 1.2;
        color: var(--tx-l);
    }

.updated-text {
    font-size: 13px;
    color: var(--mt-xl);
}

.consent-body {
    max-height: 450px;
    overflow-y: auto;
    padding: 22px 30px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--tx-m);
}

    .consent-body p {
        margin-bottom: 2px;
    }

    .consent-body h6 {
        margin: 16px 0 10px;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.4;
        color: var(--gd-dk);
    }

    .consent-body::-webkit-scrollbar {
        width: 8px;
    }

    .consent-body::-webkit-scrollbar-thumb {
        background: #D9C8E3;
        border-radius: 8px;
    }

.consent-footer {
    position: relative;
    padding: 16px 30px;
    text-align: end;
    background: var(--bg);
    border-top: 1px solid var(--line);
}

.message-text {
    display: none;
    position: absolute;
    top: 0;
    margin-top: 10px;
    font-size: 13px;
    color: var(--err);
}

.consent-bold {
    font-weight: 600;
}

.form-check-label {
    font-size: 15px;
}

.form-check.mt-3 {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

    .form-check.mt-3 label {
        cursor: pointer;
    }

input#agreeCheck {
    width: 25px;
    margin-bottom: 0;
    cursor: pointer;
    accent-color: var(--rg);
}

.policy-link {
    color: var(--rg);
    font-weight: 600;
    text-decoration: underline;
}

    .policy-link:hover {
        color: var(--rg-dk);
        text-decoration: underline;
    }

#consentModal {
    display: none;
    z-index: 9999999;
}

    #consentModal.show {
        display: block;
    }

/* ---------- Misc ---------- */
.right-box {
    height: 450px;
    overflow: hidden;
    overflow-y: overlay;
}

.upload-box {
    border: 1.5px dashed rgba(214,51,108,.45) !important;
    background: var(--bg) !important;
    border-radius: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width:1024px) {
    .consent-footer {
        display: flex;
        justify-content: flex-end;
        padding-top: 30px;
    }

    .message-text {
        top: -10px;
    }
}

@media (max-width:768px) {
    .policy-wrapper {
        padding: 24px 18px;
        margin: 20px auto;
        border-radius: 16px;
    }

        .policy-wrapper h2, .policy-wrapper h3 {
            scroll-margin-top: 70px;
        }

    .policy-header-light h1 {
        font-size: 26px;
    }

    .toc {
        position: static;
        margin-bottom: 20px;
    }

    .consent-footer {
        justify-content: center;
    }

    .message-text {
        top: -10px;
        left: 50%;
        width: 100%;
        transform: translateX(-50%);
        text-align: center;
    }

    .consent-header, .consent-body, .consent-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .btn-consent {
        min-width: 130px;
        margin: 0 4px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .btn-consent, .toc a {
        transition: none;
    }
}
