* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.preferences-body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #060a12;
    color: #ffffff;
}

button,
input {
    font: inherit;
}

.preferences-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns:
        minmax(0, 1.12fr)
        minmax(430px, 0.88fr);
    background: #060a12;
}


/*
|--------------------------------------------------------------------------
| Left Image
|--------------------------------------------------------------------------
*/

.preferences-visual {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(27, 95, 255, 0.2),
            transparent 42%
        ),
        #060a12;
}

.preferences-cover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.preferences-cover-empty {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 50% 48%,
            rgba(35, 101, 255, 0.18),
            transparent 36%
        ),
        linear-gradient(
            140deg,
            #070c16,
            #03070e
        );
}

.preferences-visual-frame {
    position: absolute;
    inset: 30px 44px 46px;
    pointer-events: none;
    border:
        2px dashed
        rgba(207, 218, 238, 0.65);
    clip-path: polygon(
        0 4%,
        85% 4%,
        90% 0,
        100% 0,
        100% 100%,
        17% 100%,
        10% 94%,
        0 94%
    );
}


/*
|--------------------------------------------------------------------------
| Right Panel
|--------------------------------------------------------------------------
*/

.preferences-panel {
    min-width: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px 42px;
    background: #070b13;
}

.preferences-panel-inner {
    width: 100%;
    max-width: 520px;
}

.preferences-logo {
    width: max-content;
    display: block;
    margin: 0 auto 40px;
}

.preferences-logo img {
    display: block;
    width: 145px;
    height: auto;
}

.preferences-header {
    margin-bottom: 24px;
    text-align: right;
}

.preferences-header h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1.35;
    font-weight: 800;
}

.preferences-header h1 span {
    color: #6d93ff;
}

.preferences-header p {
    margin: 0;
    color: #a4adbd;
    font-size: 15px;
    line-height: 1.8;
}


/*
|--------------------------------------------------------------------------
| Country Message
|--------------------------------------------------------------------------
*/

.preferences-country-message {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 27px;
    padding: 8px 12px;
    background: #10151e;
    color: #c7ccd6;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.preferences-country-message img {
    width: 24px;
    height: 17px;
    object-fit: cover;
}

.preferences-country-message strong {
    color: #ffffff;
    font-weight: 700;
}


/*
|--------------------------------------------------------------------------
| Form Sections
|--------------------------------------------------------------------------
*/

.preferences-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.09);
    color: #fecaca;
    font-size: 13px;
    text-align: center;
}

.preferences-section {
    margin: 0;
}

.preferences-section h2 {
    margin: 0 0 25px;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.7;
    font-weight: 700;
    text-align: right;
}

.preferences-divider {
    height: 1px;
    margin: 31px 0 27px;
    background: #1b202b;
}


/*
|--------------------------------------------------------------------------
| Cards
|--------------------------------------------------------------------------
*/

.preferences-options {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.preference-card {
    position: relative;
    min-width: 0;
    height: 94px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 11px 5px 7px;
    overflow: visible;
    border: 1px solid #3b414d;
    border-radius: 0;
    background: #080c13;
    color: #ffffff;
    cursor: pointer;
    appearance: none;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.preference-card:hover {
    border-color: #6884bd;
    background: #0b111c;
}

.preference-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.preference-card.is-selected {
    border: 2px solid #6c96ff;
    background: #0a101b;
}

.preference-card.is-selected::after {
    content: "";
    position: absolute;
    left: -2px;
    bottom: -2px;
    width: 0;
    height: 0;
    border-bottom: 13px solid #6c96ff;
    border-right: 13px solid transparent;
}

.preference-recommended {
    position: absolute;
    top: -12px;
    right: -2px;
    z-index: 3;
    display: none;
    padding: 4px 9px;
    border-radius: 10px 10px 0 10px;
    background: #b22cc5;
    color: #ffffff;
    font-size: 8px;
    line-height: 1;
    white-space: nowrap;
}

.preference-card.is-selected
.preference-recommended {
    display: block;
}

.preference-card-image {
    width: 38px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7ba2ff;
    font-size: 23px;
}

.preference-card-image img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.preference-card-title {
    max-width: 100%;
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preference-card-meta {
    max-width: 100%;
    overflow: hidden;
    color: #6b94ff;
    font-size: 9px;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preference-more-card {
    margin: 0;
}

.preference-more-icons {
    position: relative;
    width: 47px;
    gap: 0;
}

.preference-more-icons i {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    margin-inline: -2px;
    border: 1px solid #4b5567;
    border-radius: 50%;
    background: #131a25;
    font-size: 11px;
}


/*
|--------------------------------------------------------------------------
| Submit
|--------------------------------------------------------------------------
*/

.preferences-submit {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 34px;
    padding: 12px 18px;
    border: 0;
    border-radius: 0;
    background: #4473e8;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.15s ease;
}

.preferences-submit:hover {
    background: #527ff0;
}

.preferences-submit span {
    font-weight: 800;
}

.preferences-cookie-note {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 17px auto 0;
    color: #6e7684;
    font-size: 9px;
    line-height: 1.7;
    text-align: center;
}

.preferences-cookie-note i {
    color: #00bd75;
    font-size: 14px;
}

.preferences-cookie-note a {
    color: #8794aa;
    text-decoration: underline;
}


/*
|--------------------------------------------------------------------------
| Modal
|--------------------------------------------------------------------------
*/

.preferences-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preferences-modal.is-open {
    display: flex;
}

.preferences-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
}

.preferences-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #303746;
    background: #0a0f18;
}

.preferences-modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #252c38;
    background: #0a0f18;
}

.preferences-modal-header h3 {
    margin: 0;
    font-size: 17px;
}

.preferences-modal-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #303746;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

.preferences-modal-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 18px;
}

.modal-preference-item {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #353c48;
    background: #080c13;
    color: #ffffff;
    cursor: pointer;
}

.modal-preference-item.is-selected {
    border-color: #6c96ff;
    background: #0b1321;
}

.modal-preference-item img {
    width: 38px;
    height: 28px;
    object-fit: contain;
}


/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 920px) {

    .preferences-page {
        display: flex;
        flex-direction: column;
    }

    .preferences-visual {
        order: 1;
        min-height: 340px;
        height: 42vh;
        max-height: 500px;
    }

    .preferences-visual-frame {
        inset: 18px 20px 26px;
    }

    .preferences-panel {
        order: 2;
        min-height: auto;
        padding: 30px 22px 44px;
    }

    .preferences-panel-inner {
        max-width: 540px;
    }

}

@media (max-width: 520px) {

    .preferences-visual {
        min-height: 260px;
        height: 34vh;
    }

    .preferences-panel {
        padding:
            22px
            11px
            36px;
    }

    .preferences-logo {
        margin-bottom: 42px;
    }

    .preferences-logo img {
        width: 133px;
    }

    .preferences-header h1 {
        font-size: 22px;
    }

    .preferences-header p {
        font-size: 13px;
        white-space: nowrap;
    }

    .preferences-country-message {
        margin-inline: -11px;
        border-radius: 0;
        font-size: 9px;
        white-space: nowrap;
    }

    .preferences-section h2 {
        margin-bottom: 24px;
        font-size: 11px;
    }

    .preferences-options {
        gap: 8px;
    }

    .preference-card {
        height: 72px;
        padding: 8px 2px 5px;
    }

    .preference-card-image {
        width: 31px;
        height: 23px;
        font-size: 18px;
    }

    .preference-card-title {
        font-size: 9px;
    }

    .preference-card-meta {
        font-size: 7px;
    }

    .preference-recommended {
        top: -10px;
        padding: 3px 6px;
        font-size: 7px;
    }

    .preferences-divider {
        margin: 25px 0;
    }

    .preferences-submit {
        min-height: 38px;
        margin-top: 32px;
        padding: 9px 8px;
        font-size: 10px;
    }

    .preferences-cookie-note {
        max-width: 290px;
        font-size: 7px;
    }

    .preferences-modal-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}