/*
    Shared SOS UI primitives - design tokens, form controls, buttons and alerts.
    Linked by Layout_Auth (login / sign up / password reset) and Layout_LoggedMember
    (member area) so both keep the same look.
*/

:root {
    --sos-navy: #1b3055;
    --sos-navy-dark: #142643;
    --sos-teal: #2ba6c9;
    --sos-blue: #3f6ec7;
    --sos-border: #dfe3e8;
    --sos-placeholder: #9aa3ad;
    --sos-muted: #6b7280;
    --sos-ink: #22262b;
    --sos-page: #f4f6f9;
}

* {
    box-sizing: border-box;
}

.ar {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- form layout ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 30px;
}

.form-row {
    margin-bottom: 16px;
}

    .form-row label {
        display: block;
        margin-bottom: 7px;
        font-size: .87rem;
        font-weight: 500;
        color: #4b5563;
    }

    .form-row .req {
        color: #c01414;
    }

/* ---------- controls ---------- */
.input-sos {
    display: block;
    width: 100%;
    padding: .78rem 1rem;
    border: 1.5px solid var(--sos-border);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: .95rem;
    color: #333;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .input-sos::placeholder {
        color: var(--sos-placeholder);
    }

    .input-sos:focus {
        outline: none;
        border-color: var(--sos-teal);
        box-shadow: 0 0 0 3px rgba(43, 166, 201, .15);
    }

    .input-sos[readonly] {
        background: #f4f6f9;
        color: var(--sos-muted);
        cursor: not-allowed;
    }

select.input-sos {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa3ad' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    cursor: pointer;
}

input[type=file].input-sos {
    padding: .55rem .7rem;
    color: var(--sos-muted);
    font-size: .9rem;
}

    input[type=file].input-sos::file-selector-button {
        margin-right: 12px;
        padding: .45rem 1rem;
        border: 0;
        border-radius: 8px;
        background: #eef2f8;
        color: var(--sos-navy);
        font-family: inherit;
        font-size: .88rem;
        font-weight: 500;
        cursor: pointer;
    }

    input[type=file].input-sos::file-selector-button:hover {
        background: #e2e9f4;
    }

.field-hint {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    font-size: .8rem;
    line-height: 1.7;
    color: var(--sos-muted);
}

    .field-hint li:before {
        content: "• ";
    }

    .field-hint a {
        color: var(--sos-teal);
    }

/* password field with the eye toggle inside it */
.field-toggle {
    position: absolute;
    top: 50%;
    right: 1.1rem;
    transform: translateY(-50%);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sos-placeholder);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

    .field-toggle:hover {
        color: var(--sos-teal);
    }

.pw-wrap {
    position: relative;
}

    .pw-wrap .input-sos {
        padding-right: 2.9rem;
    }

    .pw-wrap .field-toggle {
        right: .9rem;
    }

/* ---------- buttons ---------- */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 1.05rem 1rem;
    border: 0;
    border-radius: 10px;
    background: var(--sos-navy);
    color: #fff;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease;
}

    .btn-login:hover {
        background: var(--sos-navy-dark);
        color: #fff;
    }

    .btn-login .dot {
        font-size: .7rem;
        opacity: .85;
    }

.btn-sos-outline {
    display: inline-block;
    padding: .6rem 1.6rem;
    border: 1.5px solid var(--sos-navy);
    border-radius: 10px;
    background: #fff;
    color: var(--sos-navy);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

    .btn-sos-outline:hover {
        background: var(--sos-navy);
        color: #fff;
    }

.form-foot {
    margin-top: 10px;
    padding-top: 22px;
    border-top: 1px solid #e5e9f0;
}

.terms-note {
    margin: 0 0 18px;
    font-size: .87rem;
    line-height: 1.6;
    color: var(--sos-muted);
}

    .terms-note a {
        color: var(--sos-teal);
        font-weight: 500;
        text-decoration: none;
    }

        .terms-note a:hover {
            text-decoration: underline;
        }

/* ---------- alerts ---------- */
.card-alert {
    border-radius: 10px;
    padding: .75rem .95rem;
    margin-bottom: 20px;
    font-size: .9rem;
    line-height: 1.5;
}

.card-alert-error {
    background: #fdeceb;
    border: 1px solid #f6c9c5;
    color: #96241c;
}

.card-alert-success {
    background: #eaf5ee;
    border: 1px solid #c2e2cf;
    color: #1d6b3d;
}

.card-alert-info {
    background: #eaf2fb;
    border: 1px solid #c6dbf4;
    color: #1d4f8b;
}

@media (max-width: 767.98px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
