/* Jeries phone-OTP login — minimal brand-consistent styling (full polish later). */
.jbi-login {
    display: flex;
    justify-content: center;
    padding: 48px 16px;
}
.jbi-login-card {
    position: relative;      /* establish stacking context above theme layers */
    z-index: 1;
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border: 1px solid #E4EBF4;
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    font-family: inherit;
}
.jbi-login-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #1c1f26;
}
.jbi-login-sub {
    margin: 0 0 18px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}
/* Customer / Staff toggle */
.jbi-login-toggle {
    position: relative;      /* keep the tabs above any theme overlay */
    z-index: 2;
    display: flex;
    gap: 6px;
    background: #f1f3f7;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 18px;
}
.jbi-toggle-btn {
    position: relative;      /* ensure the button is the top hit-target */
    z-index: 2;
    touch-action: manipulation;   /* register taps immediately, no 300ms delay */
    flex: 1 1 50%;
    border: 0;
    background: transparent;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.jbi-toggle-btn.is-active {
    background: #ffffff;
    color: #1c1f26;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.jbi-login label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.jbi-login input {
    width: 100%;
    box-sizing: border-box;
    height: 46px;
    padding: 0 14px;
    font-size: 16px;
    border: 1px solid #D5DCE6;
    border-radius: 10px;
    outline: none;
    margin-bottom: 16px;
    transition: border-color .15s ease;
}
.jbi-login input:focus {
    border-color: var(--jbi-gold, #a9844b);
}
#jbi-code {
    letter-spacing: 6px;
    text-align: center;
    font-weight: 600;
}
.jbi-btn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: var(--jbi-gold, #a9844b);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
}
.jbi-btn:hover { background: var(--jbi-gold-dark, #8f6d3c); }
.jbi-btn:disabled, .jbi-btn.jbi-busy { opacity: .6; cursor: default; }
.jbi-link {
    display: block;
    width: 100%;
    margin-top: 12px;
    background: none;
    border: 0;
    color: #6b7280;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.jbi-login-msg {
    margin-top: 14px;
    font-size: 13px;
    min-height: 18px;
    text-align: center;
}
.jbi-login-msg[data-kind="error"] { color: #d33a55; }
.jbi-login-msg[data-kind="ok"]    { color: var(--jbi-gold-dark, #8f6d3c); }

/* ==========================================================================
   MOBILE (<=600px). Desktop is unchanged (all rules live inside this query).
   Uses !important on the toggle + helper text to override the theme's global
   mobile button/paragraph CSS that was bleeding in (washed-out tabs, the
   "pale blue" native-button color, and the collapsed helper line-height).
   ========================================================================== */
@media (max-width: 600px) {

    .jbi-login {
        padding: 24px 14px;
    }

    .jbi-login-card {
        max-width: 100%;
        padding: 24px 18px;
        border-radius: 14px;
    }

    .jbi-login-title {
        font-size: 20px;
    }

    /* Helper text: force a real line-height + spacing so it stops collapsing
       / overlapping on itself under the theme's mobile paragraph styles. */
    .jbi-login-sub {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin: 0 0 16px !important;
        color: #5b626e !important;
        white-space: normal !important;
        overflow-wrap: break-word;
    }

    /* Segmented toggle — clearer track, bigger tap area. */
    .jbi-login-toggle {
        background: #eef1f6;
        border: 1px solid #E1E7F0;
        padding: 5px;
        gap: 6px;
        margin-bottom: 20px;
    }

    /* Kill native button chrome (source of the pale-blue tint + tap highlight)
       and set strong, high-contrast, tappable tabs. */
    .jbi-toggle-btn {
        -webkit-appearance: none !important;
        appearance: none !important;
        min-height: 44px;                 /* iOS/Android min touch target */
        border: 0 !important;
        border-radius: 8px;
        background: transparent !important;
        color: #3a4150 !important;        /* darker inactive text = readable */
        font-size: 15px !important;
        font-weight: 700 !important;
        -webkit-tap-highlight-color: transparent;
    }

    /* Active tab: solid on-brand green — unambiguous selection on a phone. */
    .jbi-toggle-btn.is-active {
        background: var(--jbi-gold, #a9844b) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 6px rgba(169, 132, 75, 0.35) !important;
    }

    /* Comfortable inputs/buttons; 16px keeps iOS from zooming on focus. */
    .jbi-login input {
        height: 50px;
        font-size: 16px;
    }

    .jbi-btn {
        height: 50px;
        font-size: 16px;
    }
}
