/*
FILE: /css/preference-choices.css
VERSION: 1.0.0
DATE: 2026-11-21
AUTHOR: BOFF Social Technologies LLC
*/

@font-face {
    font-family: "Preference Icons";
    src: url("/assets/majestymap/webfonts/fa-solid-900.woff2") format("woff2");
    font-display: block;
    font-style: normal;
    font-weight: 900;
}

.preference-choices {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .55rem;
}

.preference-choices .preference-choice {
    --strip-bg: #e8eeec;
    --strip-fg: #33554e;
    display: grid;
    grid-template-columns: clamp(2.9rem, 9vw, 4rem) minmax(0, 1fr) auto;
    align-items: center;
    min-height: 3.9rem;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 1px solid #c7d2cd;
    border-radius: .75rem;
    background: #fff;
    color: #182b29;
    text-align: start;
    cursor: pointer;
}

.preference-choice[data-choice="residency"],
.preference-choice[data-choice="top_deals_weekly_wednesday"] {
    --strip-bg: #f4ebd7;
    --strip-fg: #775222;
}

.preference-choice[data-choice="company_formation"],
.preference-choice[data-choice="exclusive_launches"] {
    --strip-bg: #e6edf6;
    --strip-fg: #314f73;
}

.preference-choice[data-choice="handover_inspection"],
.preference-choice[data-choice="market_reports"] {
    --strip-bg: #e3eeeb;
    --strip-fg: #286153;
}

.preference-choice[data-choice="emirates_insights_saturday"] {
    --strip-bg: #f1e8e4;
    --strip-fg: #7a5044;
}

.preference-choice[data-choice="no_interest"],
.preference-choice[data-choice="global_optout"] {
    --strip-bg: #edf0f2;
    --strip-fg: #495c62;
}

.preference-choice-icon {
    display: grid;
    align-self: stretch;
    place-items: center;
    border-radius: calc(.75rem - 1px) 0 0 calc(.75rem - 1px);
    background: var(--strip-bg);
    color: var(--strip-fg);
}

.preference-choice-icon::before {
    content: var(--choice-icon, "\f0e0");
    font-family: "Preference Icons", sans-serif;
    font-size: clamp(1.15rem, 3.7vw, 1.5rem);
    font-weight: 900;
    line-height: 1;
}

.preference-choice[data-choice="residency"] { --choice-icon: "\f2c2"; }
.preference-choice[data-choice="company_formation"] { --choice-icon: "\f0b1"; }
.preference-choice[data-choice="real_estate"] { --choice-icon: "\f015"; }
.preference-choice[data-choice="handover_inspection"] { --choice-icon: "\f46c"; }
.preference-choice[data-choice="no_interest"] { --choice-icon: "\f056"; }
.preference-choice[data-choice="top_deals_weekly_wednesday"] { --choice-icon: "\f02c"; }
.preference-choice[data-choice="emirates_insights_saturday"] { --choice-icon: "\f1ea"; }
.preference-choice[data-choice="exclusive_launches"] { --choice-icon: "\f135"; }
.preference-choice[data-choice="market_reports"] { --choice-icon: "\f201"; }
.preference-choice[data-choice="global_optout"] { --choice-icon: "\f1f6"; }

.preference-choice-content {
    display: block;
    padding: .8rem clamp(.65rem, 2.3vw, 1.1rem);
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.preference-choice-description {
    display: block;
    margin-top: .3rem;
    color: #435955;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.55;
}

.preference-choices .preference-choice input[type="checkbox"] {
    appearance: auto;
    position: static;
    opacity: 1;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0 clamp(.7rem, 2.6vw, 1.15rem) 0 0;
    accent-color: #316758;
    cursor: inherit;
}

.preference-choices .preference-choice:hover { border-color: #628a7a; }

.preference-choices .preference-choice:has(input:checked) {
    border-color: #427564;
    background: #f0f7f3;
}

.preference-choice:has(input:checked) .preference-choice-icon {
    background: #315f52;
    color: #fff;
}

.preference-choice:has(input:focus-visible) {
    outline: 2px solid #235b8a;
    outline-offset: 2px;
}

@media (min-width: 36rem) {
    .preference-choice-description {
        text-align: justify;
        hyphens: auto;
    }
}
