/* ============================================
   Xference - Early Adopters Invite Pages
   CSS esterno condiviso tra privacy e thankyou
   ============================================ */

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variabili dal sito principale */
:root {
    --primary-color: #F25C05;
    --secondary-black: #000000;
    --background-white: #ffffff;
    --mid-grey: #C1C1C1;
    --lines-grey: #DBDBDB;
    --text-grey: #7F7F7F;
    --light-grey: #D9D9D9;
    --bg-grey: #f5f5f5;

    --font-primary: 'IBM Plex Sans', sans-serif;
    --font-titles: 'Lexend', sans-serif;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--secondary-black);
    background-color: var(--bg-grey);
}


/* ============================================
   PAGINA PRIVACY - invite_privacy.html
   ============================================ */

/* Layout a 3 colonne: sidebar | contenuto | sidebar */
.page-wrapper {
    display: flex;
    flex: 1;
    height: 100vh;
    overflow: hidden;
}

.sidebar-left {
    width: 28%;
    min-width: 200px;
    background-color: var(--bg-grey);
    flex-shrink: 0;
}

.content-area {
    flex: 1;
    background-color: var(--background-white);
    display: flex;
    flex-direction: column;
    max-width: 750px;
    overflow: hidden;
}

.sidebar-right {
    flex: 1;
    background-color: var(--bg-grey);
}

/* Testo policy scrollabile */
.policy-content {
    flex: 1;
    overflow-y: auto;
    padding: 60px 50px 40px 50px;
}

.policy-content h1 {
    font-family: var(--font-titles);
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-black);
    margin-bottom: 20px;
    line-height: 1.3;
}

.policy-content h2 {
    font-family: var(--font-titles);
    font-size: 17px;
    font-weight: 700;
    color: var(--secondary-black);
    margin-top: 28px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.policy-content h3 {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary-black);
    margin-top: 22px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.policy-content p {
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 14px;
}

.policy-content ul {
    margin: 10px 0 14px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
}

.policy-content ul li {
    margin-bottom: 6px;
}

.policy-content .last-modified {
    font-size: 13px;
    color: var(--text-grey);
    margin-top: 30px;
    font-style: italic;
}

/* Barra consenso fissa in basso */
.consent-bar {
    background-color: var(--background-white);
    border-top: 1px solid var(--lines-grey);
    padding: 20px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-shrink: 0;
}

/* Checkbox nascosto */
.consent-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #444444;
    flex: 1;
}

/* Custom checkbox */
.consent-label::before {
    content: '';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--mid-grey);
    border-radius: 3px;
    margin-top: 1px;
    transition: all 0.2s ease;
    background-color: var(--background-white);
}

.consent-checkbox:checked + .consent-label::before {
    background-color: var(--secondary-black);
    border-color: var(--secondary-black);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.consent-checkbox:focus-visible + .consent-label::before {
    outline: 2px solid var(--secondary-black);
    outline-offset: 2px;
}

/* Pulsante disabilitato di default */
.consent-btn {
    display: inline-block;
    padding: 16px 36px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: not-allowed;
    transition: all 0.2s ease;
    white-space: nowrap;
    background-color: var(--lines-grey);
    color: var(--mid-grey);
    pointer-events: none;
}

/* Pulsante attivo */
.consent-checkbox:checked ~ .consent-btn {
    background-color: var(--secondary-black);
    color: var(--background-white);
    cursor: pointer;
    pointer-events: auto;
}

.consent-checkbox:checked ~ .consent-btn:hover {
    background-color: #333333;
}


/* ============================================
   THANK YOU PAGE - invite_thankyou.html
   ============================================ */

body.thankyou-page {
    background-color: var(--background-white);
}



/* Logo fisso in alto */
.logo {
    position: fixed;
    top: 24px;
    left: 28px;
    z-index: 10;
}

.logo img {
    height: 32px;
    width: auto;
}

/* Placeholder decorazioni SVG */
.decoration {
    position: fixed;
    z-index: 1;
}

.decoration-tl {
    top: 200px;
    left: 120px;
}

.decoration-br {
    bottom: 80px;
    right: 70px;
}

/* Contenuto principale */
.main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 80px 40px;
    position: relative;
    z-index: 5;
}

.content-wrapper {
    max-width: 750px;
    width: 100%;
}

.main-title {
    font-family: var(--font-primary);
    font-size: 40px;
    font-weight: 600;
    line-height: 48px;
    letter-spacing: 0;
    color: var(--secondary-black);
    margin-bottom: 32px;
}

.emoji-party {
    font-size: 38px;
    margin-left: 8px;
}

.main-text {
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0;
    color: var(--secondary-black);
    margin-bottom: 12px;
}

.main-text:last-of-type {
    margin-bottom: 48px;
}

/* Pulsante centrato */
.btn-wrapper {
    text-align: center;
    margin-top: 16px;
}

.btn-visit {
    display: inline-block;
    padding: 18px 40px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    background-color: var(--secondary-black);
    color: var(--background-white);
    border: none;
    transition: background-color 0.2s ease;
}

.btn-visit:hover {
    background-color: #333333;
}


/* ============================================
   PAGINA UNICA - Step consent + thank you
   ============================================ */

/* Livello nascosto */
.main-content--hidden {
    display: none;
}

/* Blocco consenso */
.consent-block {
    margin-top: 40px;
}

.consent-block .consent-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.consent-block .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0;
    color: var(--secondary-black);
}

.consent-block .main-text {
    font-size: 14px;
}

.consent-block .consent-label a {
    display: inline;
}

.consent-block .consent-label::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--mid-grey);
    border-radius: 3px;
    margin-top: 2px;
    transition: all 0.2s ease;
    background-color: var(--background-white);
}

.consent-block .consent-checkbox:checked + .consent-label::before {
    background-color: var(--secondary-black);
    border-color: var(--secondary-black);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 13px;
    background-position: center;
    background-repeat: no-repeat;
}

.consent-block .consent-checkbox:focus-visible + .consent-label::before {
    outline: 2px solid var(--secondary-black);
    outline-offset: 2px;
}

/* Link Privacy Policy inline */

.policy-link {
    color: var(--primary-color);
    text-decoration: none;
    text-underline-offset: 2px;
}

.policy-link:hover {
    color: var(--secondary-black);
}

/* Pulsante consent centrato */
.consent-btn-wrapper {
    margin-top: 36px;
    text-align: center;
}

.consent-block .consent-btn {
    display: inline-block;
    padding: 18px 40px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    background-color: var(--lines-grey);
    color: var(--mid-grey);
    cursor: not-allowed;
    pointer-events: none;
}

.consent-block .consent-checkbox:checked ~ .consent-btn-wrapper .consent-btn {
    background-color: var(--secondary-black);
    color: var(--background-white);
    cursor: pointer;
    pointer-events: auto;
}

.consent-block .consent-checkbox:checked ~ .consent-btn-wrapper .consent-btn:hover {
    background-color: #333333;
}


/* ============================================
   RESPONSIVE
   ============================================ */

/* Privacy page */
@media (max-width: 1024px) {
    .sidebar-left {
        width: 60px;
        min-width: 60px;
    }
}

@media (max-width: 768px) {
    .sidebar-left,
    .sidebar-right {
        display: none;
    }

    .content-area {
        max-width: 100%;
    }

    .policy-content {
        padding: 40px 24px 30px 24px;
    }

    .consent-bar {
        padding: 16px 24px;
        flex-direction: column;
        align-items: stretch;
    }

    .consent-btn {
        text-align: center;
        width: 100%;
    }
}

/* Thank you page */
@media (max-width: 768px) {
    .main-content {
        padding: 100px 24px 60px 24px;
    }

    .main-title {
        font-size: 30px;
    }

    .emoji-party {
        font-size: 28px;
    }

    .decoration-tl {
        top: 80px;
        left: 20px;
    }

    .decoration-br {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 26px;
    }

    .main-text {
        font-size: 15px;
    }

    .decoration {
        display: none;
    }
}
