/* ==========================================================================
   TIER-1 ADD PHONE NUMBER: FLOATING LABELS, COUNTRY DROPDOWN & LIVE ERRORS
   ========================================================================== */

.mcb-add-phone-container {
    width: 100% !important;
}

/* Nav */
.mcb-ap-nav-header {
    margin-bottom: 18px !important;
}

.mcb-ap-nav-header a.mcb-back-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #7c3aed !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    font-family: inherit !important;
}

/* Full-Width Alert Bar */
.mcb-fullwidth-alert-bar {
    width: 100% !important;
    border-radius: 12px !important;
    padding: 14px 20px !important;
    margin-bottom: 22px !important;
    display: none;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
}

.mcb-fullwidth-alert-bar.show {
    display: flex !important;
}

.mcb-fullwidth-alert-bar.success {
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1px solid #10b981 !important;
    color: #065f46 !important;
}

.mcb-fullwidth-alert-bar.error {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid #ef4444 !important;
    color: #991b1b !important;
}

.mcb-alert-circle-close {
    width: 28px !important;
    height: 28px !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;
}

/* Card */
.mcb-add-phone-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 28px 32px !important;
    background: transparent !important;
    box-sizing: border-box !important;
    margin-bottom: 24px !important;
}

.mcb-ap-header-row {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    margin-bottom: 26px !important;
}

.mcb-ap-icon-circle {
    width: 50px !important;
    height: 50px !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;
    flex-shrink: 0 !important;
}

.mcb-ap-icon-circle svg {
    stroke: #7c3aed !important;
}

.mcb-ap-header-info h3 {
    margin: 0 0 4px 0 !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: inherit !important;
}

.mcb-ap-header-info p {
    margin: 0 !important;
    font-size: 13.5px !important;
    color: #64748b !important;
}

/* Combined Country Selector + Phone Input Flex Container */
.mcb-phone-input-combo {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    max-width: 540px !important;
    width: 100% !important;
}

/* 1. Country Picker Dropdown Component */
.mcb-country-picker-wrap {
    position: relative !important;
    flex-shrink: 0 !important;
}

.mcb-country-btn-trigger {
    height: 54px !important;
    border: 1px solid rgba(148, 163, 184, 0.4) !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: all 0.2s ease !important;
}

.mcb-country-btn-trigger:hover,
.mcb-country-picker-wrap.open .mcb-country-btn-trigger {
    border-color: #7c3aed !important;
}

/* Rotating Arrow SVG */
.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; /* Smooth 180 Rotation */
    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;
}

/* Search input inside country dropdown */
.mcb-country-search-input {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    outline: none !important;
    margin-bottom: 6px !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;
}

/* 2. FLOATING LABEL INPUT COMPONENT */
.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 rgba(148, 163, 184, 0.4) !important;
    border-radius: 10px !important;
    padding: 20px 14px 6px 14px !important; /* Space for floating label above */
    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;
}

/* Floating Label Transition */
.mcb-floating-label {
    position: absolute !important;
    top: 17px !important;
    left: 14px !important;
    font-size: 14px !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;
}

/* State when focused or containing text */
.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;
}

/* 3. ADVANCED TEXT-BASED ERROR VALIDATION */
.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;
}

/* 4. 6-Digit SMS OTP Box */
.mcb-sms-otp-wrapper {
    display: none;
    margin-top: 24px !important;
    padding-top: 22px !important;
    border-top: 1px dashed rgba(148, 163, 184, 0.5) !important;
}

.mcb-sms-otp-wrapper.active {
    display: block !important;
}

.mcb-otp-input-digits {
    width: 100% !important;
    max-width: 250px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: 6px !important;
    text-align: center !important;
    background: transparent !important;
    border: 2px solid #7c3aed !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    color: #7c3aed !important;
    outline: none !important;
}

/* Buttons */
.mcb-btn-pill-action {
    border-radius: 50px !important;
    background: #7c3aed !important;
    border: 1px solid #7c3aed !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 11px 26px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25) !important;
    transition: all 0.2s ease !important;
}

.mcb-btn-pill-action:hover {
    background: #6d28d9 !important;
    transform: translateY(-1px) !important;
}

.mcb-btn-pill-action svg {
    stroke: #ffffff !important;
    transition: transform 0.2s ease !important;
}

.mcb-btn-pill-action:hover svg {
    transform: translateX(3px) !important;
}

@media screen and (max-width: 850px) {
    .mcb-phone-input-combo {
        flex-direction: column !important;
    }

    .mcb-country-picker-wrap,
    .mcb-country-btn-trigger,
    .mcb-btn-pill-action {
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: space-between !important;
    }
}