/**
 * Soul2path Auth — Complete stylesheet
 *
 * Merged from the legacy sms-login.css + sms-reg.css.
 * All styles scoped to the card. No font-family declarations
 * (inherits theme Poppins). No external font imports.
 *
 * Loaded via the existing sms-login-style handle in sms-login.php.
 */

/* ── CSS variables ─────────────────────────────────────── */
:root {
    --s2p-dark:      #1E3F7A;
    --s2p-mid:       #4169A8;
    --s2p-light:     #EBF0F8;
    --s2p-ring:      rgba(65, 105, 168, 0.18);
    --s2p-border:    #C5D3E8;
    --s2p-radius:    12px;
    --s2p-radius-sm: 8px;
}

/* ════════════════════════════════════════════════════════════
   Container + card
   ════════════════════════════════════════════════════════════ */
.sms-login-container {
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 0;
}
.sms-login-form {
    background-color: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--s2p-border);
    padding: 36px 36px 40px;
    margin: 20px 0;
}

/* ── Logo (explicit centering, belt + braces) ──────────── */
.sms-login-logo {
    text-align: center;
    margin: 0 auto 24px;
    display: block;
}
.sms-login-logo img {
    display: block;
    margin: 0 auto;
    max-width: 180px;
    height: auto;
}

/* ── Heading (unused on the new card but kept for back-compat) */
.sms-login-form h2 {
    text-align: center;
    margin: 0 0 8px;
    color: var(--s2p-dark);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* ════════════════════════════════════════════════════════════
   Tab strip
   ════════════════════════════════════════════════════════════ */
.s2p-auth-tabs {
    display: flex;
    background: var(--s2p-light);
    border-radius: var(--s2p-radius-sm);
    padding: 4px;
    margin: 0 0 24px;
    gap: 4px;
}
.s2p-auth-tab {
    flex: 1;
    padding: 11px 14px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--s2p-mid);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    line-height: 1.2;
    text-align: center;
}
.s2p-auth-tab:hover  { background-color: rgba(255, 255, 255, 0.6); }
.s2p-auth-tab.is-active {
    background-color: #ffffff;
    color: var(--s2p-dark);
    box-shadow: 0 1px 3px rgba(30, 63, 122, 0.12);
}
.s2p-auth-tab:focus-visible {
    outline: 2px solid var(--s2p-mid);
    outline-offset: 2px;
}

/* Panels — only the active one is visible */
.s2p-auth-panel             { display: none; }
.s2p-auth-panel.is-active   { display: block; }


/* ════════════════════════════════════════════════════════════
   Common form layout — centered column inside the card
   ════════════════════════════════════════════════════════════ */
.sms-login-info {
    margin: 0 auto 22px;
    max-width: 440px;
    color: #5a6a85;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.sms-login-field {
    margin: 0 auto 22px;
    max-width: 440px;
}
.sms-login-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 500;
    font-size: 13px;
    color: var(--s2p-dark);
    letter-spacing: 0.01em;
}

.sms-login-field input[type="text"],
.sms-login-field input[type="password"],
.sms-login-field input[type="email"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--s2p-border);
    border-radius: var(--s2p-radius-sm);
    font-size: 15px;
    color: #1a1a2e;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.sms-login-field input[type="text"]:focus,
.sms-login-field input[type="password"]:focus,
.sms-login-field input[type="email"]:focus {
    border-color: var(--s2p-mid);
    box-shadow: 0 0 0 3px var(--s2p-ring);
    outline: none;
}
.sms-login-field input[type="text"].is-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.sms-login-field input[type="password"] {
    letter-spacing: 4px;
}

.sms-login-tip {
    font-size: 12px;
    color: #8a9ab5;
    margin: 6px 0 0;
}

/* Passcode meta row — tip left, lost link right */
.sms-login-passcode-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 6px;
}
.sms-login-passcode-meta .sms-login-tip { margin: 0; }

.sms-login-lost-link {
    font-size: 12px;
    color: var(--s2p-mid);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.sms-login-lost-link:hover {
    color: var(--s2p-dark);
    text-decoration: underline;
}


/* ════════════════════════════════════════════════════════════
   6-box OTP passcode input (login step 2)
   Grid (not flex) so each cell is forced to exactly 1/6 of
   the row regardless of any width:100% inherited from the
   theme or the generic .sms-login-field input rule.
   Safari + Chrome + Firefox all handle this identically.
   ════════════════════════════════════════════════════════════ */
.s2p-auth .sms-login-field .sms-otp,
.sms-login-field .sms-otp,
#sms-otp,
div.sms-otp {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

.s2p-auth .sms-login-field .sms-otp .sms-otp-input,
.sms-login-field .sms-otp .sms-otp-input,
.sms-otp .sms-otp-input,
#sms-otp .sms-otp-input,
input.sms-otp-input {
    /* Sizing — grid cell controls the width, height is fixed */
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    /* Look */
    border: 1.5px solid var(--s2p-border) !important;
    border-radius: var(--s2p-radius-sm) !important;
    background: #fff !important;
    color: #1a1a2e !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 56px !important;
    text-align: center !important;
    letter-spacing: 0 !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s !important;
    /* Safari/Chrome resets — no rounded native look, no number spinners */
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}
.sms-otp-input::-webkit-outer-spin-button,
.sms-otp-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.s2p-auth .sms-login-field .sms-otp .sms-otp-input:focus,
.sms-login-field .sms-otp .sms-otp-input:focus,
.sms-otp .sms-otp-input:focus,
input.sms-otp-input:focus {
    border-color: var(--s2p-mid) !important;
    box-shadow: 0 0 0 3px var(--s2p-ring) !important;
    outline: none !important;
}
.s2p-auth .sms-login-field .sms-otp .sms-otp-input.is-filled,
.sms-login-field .sms-otp .sms-otp-input.is-filled,
.sms-otp .sms-otp-input.is-filled,
input.sms-otp-input.is-filled {
    border-color: var(--s2p-mid) !important;
    background: #fbfcfe !important;
}


/* ════════════════════════════════════════════════════════════
   Actions row + buttons
   ════════════════════════════════════════════════════════════ */
.sms-login-actions {
    margin: 24px auto 0;
    max-width: 440px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sms-login-button {
    flex: 1;
    background-color: var(--s2p-dark);
    color: #ffffff;
    border: none;
    border-radius: var(--s2p-radius-sm);
    padding: 13px 28px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    letter-spacing: 0.01em;
    /* Force centering — theme CSS often left-aligns buttons */
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.sms-login-button:hover    { background-color: var(--s2p-mid); }
.sms-login-button:active   { background-color: #163060; }
.sms-login-button:disabled { background-color: #b0bdd4; cursor: not-allowed; }

.sms-login-button-secondary {
    flex: 0 0 auto;
    background-color: transparent;
    color: var(--s2p-dark);
    border: 1.5px solid var(--s2p-mid);
    border-radius: var(--s2p-radius-sm);
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    /* Force centering */
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sms-login-button-secondary:hover  { background-color: var(--s2p-light); }
.sms-login-button-secondary:active { background-color: #d5e0f0; }


/* ════════════════════════════════════════════════════════════
   Messages (errors + success)
   ════════════════════════════════════════════════════════════ */
.sms-login-message {
    margin: 16px auto 0;
    max-width: 440px;
    font-size: 13.5px;
    min-height: 0;
    line-height: 1.5;
    border-radius: var(--s2p-radius-sm);
    transition: all 0.2s;
}
.sms-login-message.error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background-color: #fdf2f2;
    border: 1px solid #f0c4c4;
    border-left: 4px solid #c0392b;
    color: #8b1a1a;
    border-radius: 0 var(--s2p-radius-sm) var(--s2p-radius-sm) 0;
}
.sms-login-message.error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px; min-width: 20px;
    background-color: #c0392b;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin-top: 1px;
}
.sms-login-message.success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background-color: #f0faf4;
    border: 1px solid #b2dfc4;
    border-left: 4px solid #1e7a47;
    color: #145230;
    border-radius: 0 var(--s2p-radius-sm) var(--s2p-radius-sm) 0;
}
.sms-login-message.success::before {
    content: '\2713';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px; min-width: 20px;
    background-color: #1e7a47;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin-top: 1px;
}


/* ════════════════════════════════════════════════════════════
   Verify info banner (passcode step intro)
   ════════════════════════════════════════════════════════════ */
.sms-login-verify-info {
    margin: 0 auto 22px;
    max-width: 440px;
    background-color: var(--s2p-light);
    border-left: 3px solid var(--s2p-mid);
    border-radius: 0 var(--s2p-radius-sm) var(--s2p-radius-sm) 0;
    padding: 12px 16px;
}
.sms-login-verify-info p {
    margin: 0;
    color: var(--s2p-dark);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.5;
}


/* ════════════════════════════════════════════════════════════
   Footer link ("Not a member yet?" / "Already a member?")
   ════════════════════════════════════════════════════════════ */
.sms-login-not-member {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 0.5px solid var(--s2p-border);
    font-size: 13px;
    color: #5a6a85;
    flex-wrap: wrap;
    text-align: center;
}
.sms-login-reg-link {
    color: var(--s2p-mid);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.sms-login-reg-link:hover { color: var(--s2p-dark); }


/* ════════════════════════════════════════════════════════════
   DOB row (3 inputs)
   ════════════════════════════════════════════════════════════ */
.s2p-dob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 10px;
}
.s2p-dob-input {
    text-align: center;
}


/* ════════════════════════════════════════════════════════════
   Phone row (country code + number)
   ════════════════════════════════════════════════════════════ */
.s2p-phone-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
}
.s2p-country-sel {
    padding: 11px 10px;
    border: 1.5px solid var(--s2p-border);
    border-radius: var(--s2p-radius-sm);
    font-size: 14px;
    color: var(--s2p-dark);
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.s2p-country-sel:focus {
    border-color: var(--s2p-mid);
    box-shadow: 0 0 0 3px var(--s2p-ring);
    outline: none;
}

.s2p-reg-select {
    width: 100%;
    max-width: 100%;
}


/* ════════════════════════════════════════════════════════════
   Free-minutes bonus picker (phone vs online chat)
   ════════════════════════════════════════════════════════════ */
.s2p-bonus-row {
    display: flex;
    gap: 10px;
}
.s2p-bonus-opt {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1.5px solid var(--s2p-border);
    border-radius: var(--s2p-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.s2p-bonus-opt:hover { border-color: var(--s2p-mid); }
.s2p-bonus-opt.is-selected {
    border-color: var(--s2p-mid);
    background: var(--s2p-light);
}
.s2p-bonus-opt:focus-visible {
    outline: 2px solid var(--s2p-mid);
    outline-offset: 2px;
}
.s2p-bonus-dot {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 1.5px solid var(--s2p-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.s2p-bonus-opt.is-selected .s2p-bonus-dot { border-color: var(--s2p-mid); }
.s2p-bonus-opt.is-selected .s2p-bonus-dot::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--s2p-mid);
}
.s2p-bonus-text  { display: flex; flex-direction: column; min-width: 0; }
.s2p-bonus-title { font-size: 14px; font-weight: 500; color: var(--s2p-dark); line-height: 1.3; }
.s2p-bonus-sub   { font-size: 12px; color: #5a6a85; line-height: 1.4; margin-top: 2px; }

@media (max-width: 380px) {
    .s2p-bonus-row { flex-direction: column; }
}


/* ════════════════════════════════════════════════════════════
   Terms / optin checkboxes
   ════════════════════════════════════════════════════════════ */
.s2p-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 14px auto 0;
    max-width: 440px;
    font-size: 13px;
    line-height: 1.55;
    color: #5a6a85;
}
.s2p-chk {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1.5px solid var(--s2p-border);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.s2p-chk:hover   { border-color: var(--s2p-mid); }
.s2p-chk.checked {
    background: var(--s2p-mid);
    border-color: var(--s2p-mid);
}
.s2p-chk:focus-visible {
    outline: 2px solid var(--s2p-mid);
    outline-offset: 2px;
}
.s2p-ttext { flex: 1; min-width: 0; }
.s2p-ttext a,
.s2p-tlink {
    color: var(--s2p-mid);
    font-weight: 500;
    text-decoration: none;
}
.s2p-ttext a:hover,
.s2p-tlink:hover {
    color: var(--s2p-dark);
    text-decoration: underline;
}


/* ════════════════════════════════════════════════════════════
   Success state (after registration)
   ════════════════════════════════════════════════════════════ */
.s2p-success-body {
    text-align: center;
    padding: 8px 0 0;
}
.s2p-success-icon {
    margin: 0 auto 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f0faf4;
    display: flex;
    align-items: center;
    justify-content: center;
}
.s2p-success-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 500;
    color: var(--s2p-dark);
}
.s2p-success-msg {
    margin: 0 auto 22px;
    max-width: 44ch;
    font-size: 14px;
    line-height: 1.6;
    color: #5a6a85;
}
.s2p-code-box {
    margin: 0 auto 24px;
    max-width: 320px;
    padding: 18px;
    background: var(--s2p-light);
    border-radius: var(--s2p-radius-sm);
    text-align: center;
}
.s2p-code-lbl {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--s2p-mid);
    font-weight: 600;
}
.s2p-code-val {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 500;
    color: var(--s2p-dark);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}
.s2p-code-hint {
    font-size: 12px;
    color: #8a9ab5;
    line-height: 1.5;
}


/* ════════════════════════════════════════════════════════════
   User info block (dashboard view in legacy template)
   ════════════════════════════════════════════════════════════ */
.sms-login-user-info {
    background-color: var(--s2p-light);
    border-radius: var(--s2p-radius-sm);
    padding: 14px 16px;
    margin-bottom: 20px;
}
.sms-login-user-info p {
    margin: 4px 0;
    color: var(--s2p-dark);
    font-size: 13.5px;
}


/* ════════════════════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════════════════════ */
@media (max-width: 560px) {
    .sms-login-container { padding: 16px; }
    .sms-login-form      { padding: 24px 18px 28px; border-radius: 14px; }

    .s2p-auth-tab        { font-size: 13px; padding: 10px 8px; }

    .sms-login-actions   { flex-direction: column; }
    .sms-login-button,
    .sms-login-button-secondary {
        width: 100%;
        flex: none;
    }

    .s2p-phone-row       { grid-template-columns: 96px 1fr; gap: 8px; }
    .s2p-country-sel     { font-size: 13px; padding: 11px 8px; }
    .s2p-dob-row         { gap: 8px; }
    .s2p-code-val        { font-size: 22px; }

    /* OTP — tighter gap, smaller boxes for narrow screens */
    .s2p-auth .sms-login-field .sms-otp,
    .sms-login-field .sms-otp { gap: 6px; }
    .s2p-auth .sms-login-field .sms-otp .sms-otp-input,
    .sms-login-field .sms-otp .sms-otp-input,
    input.sms-otp-input {
        font-size: 18px;
        height: 48px;
        line-height: 48px;
        max-width: none;
    }
}
