/* =====================================================================
   WINSOFT auth design system — shared by login / register / document / faceid.
   Background stays whatever the page sets (managed from DB); this only styles
   the dark card, gold buttons, tabs, inputs, phone selector and camera area.
   ===================================================================== */
:root {
    --wa-gold-1: #e6a91e;
    --wa-gold-2: #c8871a;
    --wa-card-bg: #191a1e;
    --wa-card-border: #34363d;
    --wa-input-bg: #101114;
    --wa-input-border: #3a3c44;
    --wa-input-border-focus: #e6a91e;
    --wa-text: #ffffff;
    --wa-muted: #9aa0ad;
    --wa-radius: 14px;
}

* { box-sizing: border-box; }

.wa-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: "Questrial", Arial, Helvetica, sans-serif;
}
.wa-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 0; }

.wa-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--wa-card-bg);
    border: 1px solid var(--wa-card-border);
    border-radius: 22px;
    padding: 26px 26px 22px;
    color: var(--wa-text);
    box-shadow: 0 18px 60px rgba(0,0,0,.55);
}

.wa-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.wa-logo img { height: 46px; }

/* ── Tabs ── */
.wa-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.wa-tab {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px;
    border-radius: var(--wa-radius);
    border: 1px solid var(--wa-card-border);
    background: #202127;
    color: #d7d9e0;
    font-size: 15px; font-weight: 600;
    text-decoration: none; cursor: pointer;
}
.wa-tab.active {
    background: linear-gradient(180deg, var(--wa-gold-1), var(--wa-gold-2));
    border-color: transparent;
    color: #1a1205;
}
.wa-tab svg { width: 16px; height: 16px; }

.wa-title { margin: 4px 0 16px; font-size: 22px; font-weight: 700; }
.wa-title.center { text-align: center; }
.wa-subtitle { margin: -6px 0 18px; color: var(--wa-muted); font-size: 14px; line-height: 1.5; text-align: center; }

/* ── Inputs ── */
.wa-field {
    display: flex; align-items: center; gap: 10px;
    height: 54px; padding: 0 16px;
    background: var(--wa-input-bg);
    border: 1px solid var(--wa-input-border);
    border-radius: var(--wa-radius);
    margin-bottom: 14px;
}
.wa-field:focus-within { border-color: var(--wa-input-border-focus); }
.wa-field .wa-ic { width: 18px; height: 18px; flex: 0 0 18px; color: var(--wa-muted); }
.wa-field input,
.wa-field select {
    flex: 1; min-width: 0;
    background: transparent; border: 0; outline: none;
    color: var(--wa-text); font-size: 15px;
}
.wa-field input::placeholder { color: var(--wa-muted); }
.wa-field select { color: var(--wa-text); appearance: none; cursor: pointer; }
.wa-field select option { color: #111; }
.wa-field .wa-caret { width: 16px; height: 16px; color: var(--wa-muted); }

/* ── Phone with selectable country code ── */
.wa-phone .wa-cc {
    display: flex; align-items: center; gap: 6px;
    background: transparent; border: 0; outline: none;
    color: var(--wa-text); font-size: 15px; cursor: pointer;
    padding-right: 10px; margin-right: 6px;
    border-right: 1px solid var(--wa-input-border);
}
.wa-phone .wa-cc option { color: #111; }

/* ── Buttons ── */
.wa-btn {
    width: 100%; height: 54px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: 0; border-radius: var(--wa-radius);
    background: linear-gradient(180deg, var(--wa-gold-1), var(--wa-gold-2));
    color: #1a1205; font-size: 16px; font-weight: 700; cursor: pointer;
    text-decoration: none;
}
.wa-btn:disabled { opacity: .6; cursor: default; }
.wa-btn.loading { opacity: .8; pointer-events: none; }
.wa-btn-ghost {
    width: 100%; height: 48px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: transparent; border: 1px solid var(--wa-input-border);
    border-radius: var(--wa-radius); color: #e9e9ee;
    font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
}

/* ── Checkboxes ── */
.wa-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 14px; color: #d7d9e0; font-size: 13px; line-height: 1.4; }
.wa-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--wa-gold-1); flex: 0 0 20px; }
.wa-check a, .wa-check .u { color: var(--wa-gold-1); text-decoration: underline; }

/* ── Upload row (document) ── */
.wa-upload {
    display: flex; align-items: center; gap: 12px;
    height: 56px; padding: 0 16px;
    background: var(--wa-input-bg); border: 1px solid var(--wa-input-border);
    border-radius: var(--wa-radius); color: #d7d9e0; cursor: pointer; margin-bottom: 16px;
}
.wa-upload .wa-ic { width: 20px; height: 20px; color: var(--wa-muted); }
.wa-upload .name { flex: 1; font-size: 15px; }
.wa-upload .arrow { width: 18px; height: 18px; color: var(--wa-muted); }

/* ── Camera (faceid) ── */
.wa-camera {
    position: relative;
    width: 100%; aspect-ratio: 1 / 1;
    background: #0c0d10; border-radius: var(--wa-radius);
    overflow: hidden; margin-bottom: 16px;
}
.wa-camera video, .wa-camera img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-camera .wa-frame { position: absolute; inset: 14px; pointer-events: none; }
.wa-camera .wa-frame span {
    position: absolute; width: 34px; height: 34px;
    border: 3px solid var(--wa-gold-1);
}
.wa-camera .wa-frame .tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.wa-camera .wa-frame .tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; }
.wa-camera .wa-frame .bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.wa-camera .wa-frame .br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }

/* ── Footer links / support / social ── */
.wa-forgot { display: block; text-align: center; color: #e9e9ee; font-size: 14px; margin: 6px 0 14px; text-decoration: none; }
.wa-support { margin: 2px 0 12px; }
.wa-social { display: flex; gap: 12px; }
.wa-social a {
    flex: 1; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: var(--wa-radius); font-weight: 600; text-decoration: none; font-size: 14px;
}
.wa-social .wa-wa { background: #1f2a24; color: #35d07f; border: 1px solid #2c7a52; }
.wa-social .wa-tg { background: #1b2430; color: #4aa8e0; border: 1px solid #2f5f80; }

.wa-error { min-height: 8px; margin-top: 10px; text-align: center; color: #ff6b6b; font-size: 13px; }
.hidden { display: none !important; }

/* =====================================================================
   Register page — styles the legacy class hooks (kept so register.js /
   common.js keep working) to match the WINSOFT design.
   ===================================================================== */
.input-wrapper { position: relative; }
.error_text { color: #ff6b6b; font-size: 12px; margin: -8px 0 10px 4px; min-height: 2px; }
.wa-field.error { border-color: #ff6b6b; }

/* Country dropdown */
.input_group--dropdown { position: relative; cursor: pointer; }
.country_input { cursor: pointer; }
.wa-field .wa-caret { margin-left: auto; }
.countries_dropdown {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    background: #14151a; border: 1px solid var(--wa-input-border); border-radius: 12px;
    z-index: 30; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.55);
}
.countries_dropdown.show { display: block; }
.dropdown_search { padding: 8px; border-bottom: 1px solid var(--wa-input-border); }
.dropdown_search input {
    width: 100%; height: 38px; padding: 0 12px; border-radius: 8px;
    background: var(--wa-input-bg); border: 1px solid var(--wa-input-border); color: #fff; outline: none;
}
.countries_list { max-height: 210px; overflow-y: auto; }
.country_option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #e6e7ec; cursor: pointer; }
.country_option:hover { background: #1f2230; }
.country_flag_img { width: 20px; height: 14px; border-radius: 2px; }

/* Checkboxes */
.checkboxes_wrapper { margin-top: 4px; }
.checkbox_error { text-align: left; }

/* intl-tel-input (phone with selectable country code) — dark theme inside .wa-field */
.wa-field .iti { flex: 1; min-width: 0; }
.wa-field input#phone {
    background: transparent !important; border: 0 !important; color: #fff !important;
    outline: none; font-size: 15px; width: 100%;
}
.iti__dropdown-content, .iti__country-list {
    background: #14151a !important; color: #fff !important;
    border: 1px solid var(--wa-input-border) !important;
}
.iti__country.iti__highlight, .iti__country:hover { background: #1f2230 !important; }
.iti--separate-dial-code .iti__selected-dial-code, .iti__selected-country { color: #fff !important; }
.iti__search-input { background: #101114 !important; color: #fff !important; }
