/* ==========================================================================
   TIER-1 PASSWORDLESS PHONE LOGIN: FLOATING LABELS & COUNTRY DROPDOWN
   ========================================================================== */

.mcb-phone-login-wrapper {
    width: 100% !important;
    max-width: 440px !important;
    margin: 40px auto 60px auto !important;
    box-sizing: border-box !important;
}

/* 1. Header & Back Link */
.mcb-pl-nav-header {
    margin-bottom: 24px !important;
}

.mcb-pl-nav-header a.mcb-back-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    font-family: inherit !important;
    transition: color 0.15s ease !important;
}

.mcb-pl-nav-header a.mcb-back-link:hover {
    color: #7c3aed !important;
}

/* 2. Main Authentication Card */
.mcb-phone-login-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 32px 32px !important;
    background: #ffffff !important; /* Solid clean card */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
}

.mcb-pl-icon-badge {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    background: rgba(124, 58, 237, 0.08) !important;
    color: #7c3aed !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 18px !important;
}

.mcb-pl-icon-badge svg {
    stroke: currentColor !important;
}

.mcb-phone-login-card h3 {
    margin: 0 0 6px 0 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.mcb-phone-login-card p {
    margin: 0 0 24px 0 !important;
    font-size: 13.5px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

/* 3. Full-Width Notification Alert Bar */
.mcb-auth-alert-bar {
    width: 100% !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
    display: none;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
}

.mcb-auth-alert-bar.show {
    display: flex !important;
    animation: mcbFadeDown 0.2s ease forwards !important;
}

.mcb-auth-alert-bar.error {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid #ef4444 !important;
    color: #991b1b !important;
}

.mcb-auth-alert-bar.success {
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1px solid #10b981 !important;
    color: #065f46 !important;
}

.mcb-alert-circle-close {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid currentColor !important;
    color: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
}

/* 4. Country Selector + Floating Input Combo */
.mcb-phone-input-combo {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
}

.mcb-country-picker-wrap {
    position: relative !important;
    flex-shrink: 0 !important;
}

.mcb-country-btn-trigger {
    height: 54px !important;
    border: 1px solid #d0d7de !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: inherit !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.mcb-country-btn-trigger:focus,
.mcb-country-picker-wrap.open .mcb-country-btn-trigger {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
    outline: none !important;
}

.mcb-arrow-rotator {
    stroke: #64748b !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.mcb-country-picker-wrap.open .mcb-arrow-rotator {
    transform: rotate(180deg) !important;
    stroke: #7c3aed !important;
}

/* Dropdown Menu */
.mcb-country-list-dropdown {
    display: none;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    width: 280px !important;
    max-height: 290px !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16) !important;
    z-index: 9999999 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
}

.mcb-country-picker-wrap.open .mcb-country-list-dropdown {
    display: block !important;
    animation: mcbFadeDown 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes mcbFadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.mcb-country-search-input {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    outline: none !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.mcb-country-search-input:focus {
    border-color: #7c3aed !important;
}

.mcb-country-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 10px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    color: #1e293b !important;
    transition: background 0.15s ease !important;
}

.mcb-country-item:hover {
    background: #f5f3ff !important;
    color: #7c3aed !important;
}

/* 5. Floating Label Input */
.mcb-floating-group {
    position: relative !important;
    flex: 1 !important;
    width: 100% !important;
}

.mcb-floating-input {
    width: 100% !important;
    height: 54px !important;
    background: transparent !important;
    border: 1px solid #d0d7de !important;
    border-radius: 10px !important;
    padding: 20px 14px 6px 14px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: inherit !important;
    font-family: inherit !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.mcb-floating-input:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
}

.mcb-floating-label {
    position: absolute !important;
    top: 17px !important;
    left: 14px !important;
    font-size: 13.5px !important;
    color: #64748b !important;
    font-weight: 500 !important;
    pointer-events: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    user-select: none !important;
}

.mcb-floating-input:focus ~ .mcb-floating-label,
.mcb-floating-input:not(:placeholder-shown) ~ .mcb-floating-label {
    top: 6px !important;
    font-size: 10.5px !important;
    color: #7c3aed !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Live Error Text */
.mcb-field-error-text {
    display: none;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #ef4444 !important;
    margin-top: 6px !important;
    align-items: center !important;
    gap: 6px !important;
}

.mcb-field-error-text.show {
    display: flex !important;
}

.mcb-field-error-text svg {
    stroke: #ef4444 !important;
    flex-shrink: 0 !important;
}

/* 6. Primary Buttons (Disabled Default) */
.mcb-btn-auth-submit {
    width: 100% !important;
    border-radius: 50px !important;
    background: #7c3aed !important;
    border: 1px solid #7c3aed !important;
    color: #ffffff !important;
    padding: 13px 24px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-family: inherit !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    margin-top: 10px !important;
}

.mcb-btn-auth-submit:hover:not(:disabled) {
    background: #6d28d9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4) !important;
}

.mcb-btn-auth-submit svg {
    stroke: #ffffff !important;
    transition: transform 0.2s ease !important;
}

.mcb-btn-auth-submit:hover:not(:disabled) svg {
    transform: translateX(3px) !important;
}

.mcb-btn-auth-submit:disabled,
.mcb-btn-auth-submit.is-disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* 7. Hidden OTP Step Wrapper */
.mcb-otp-step-wrapper {
    display: none;
    margin-top: 24px !important;
    padding-top: 24px !important;
    border-top: 1px dashed rgba(148, 163, 184, 0.5) !important;
    animation: mcbFadeDown 0.3s ease forwards !important;
}

.mcb-otp-step-wrapper.active {
    display: block !important;
}

.mcb-otp-digit-input {
    width: 100% !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    letter-spacing: 8px !important;
    text-align: center !important;
    background: transparent !important;
    border: 2px solid #7c3aed !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    color: #7c3aed !important;
    outline: none !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
}

/* Mobile */
@media screen and (max-width: 500px) {
    .mcb-phone-login-wrapper {
        margin: 20px auto 40px auto !important;
        padding: 0 16px !important;
    }

    .mcb-phone-login-card {
        padding: 24px 20px !important;
    }

    .mcb-phone-input-combo {
        flex-direction: column !important;
    }

    .mcb-country-picker-wrap,
    .mcb-country-btn-trigger {
        width: 100% !important;
        justify-content: space-between !important;
    }
}