/* 1. ISOLATION LAYER: Reset any inherited site-wide styles */
.m-card, .m-card *, .m-card *::before, .m-card *::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
    line-height: 1.4 !important; /* Forces a consistent vertical rhythm */
}

/* 2. OVERLAY & BACKDROP */
.m-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999; /* Higher than your navbar (1000) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.m-overlay.m-open {
    opacity: 1;
    visibility: visible;
}

.m-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 22, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 3. MODAL CARD (The UI from the image) */
.m-card {
    position: relative;
    width: 100%;
    max-width: 440px; /* Slightly wider to prevent text cramping */
    background: #0f1325; /* Exact match to image */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px 28px;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    z-index: 100001;
}

.m-overlay.m-open .m-card {
    transform: translateY(0) scale(1);
}

/* 4. TYPOGRAPHY */
.m-title {
    font-size: 24px; /* Matches the "Callback Request" size */
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px !important;
    text-align: left;
}

.m-subtitle {
    font-size: 14px;
    color: #909bb7; /* Muted secondary text color */
    font-weight: 400;
    margin-bottom: 28px !important;
    text-align: left;
}

/* 5. FORM INPUTS */
.m-field {
    margin-bottom: 20px !important;
}

.m-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px !important;
}

.m-input {
    width: 100% !important;
    height: 50px !important; /* Consistent height from image */
    padding: 0 16px !important;
    background: transparent !important;
    border: 1.5px solid #212841 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    outline: none;
    transition: border-color 0.2s;
}

.m-input:focus {
    border-color: #854dff !important; /* Purple focus state */
}

/* Phone Number Alignment */
.m-phone-row {
    display: flex !important;
    gap: 10px !important;
    align-items: center;
}

.m-code {
    flex-shrink: 0;
    width: 85px !important;
    height: 50px !important;
    background: transparent !important;
    border: 1.5px solid #212841 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding-left: 12px !important;
    cursor: pointer;
    font-size: 14px;
}

/* 6. reCAPTCHA SIMULATION */
.m-captcha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1c2136; /* Darker captcha background */
    border-radius: 6px;
    margin-bottom: 24px;
    height: 70px;
    cursor: pointer;
    border: 1px solid transparent;
}

.m-cap-text {
    font-size: 14px;
    color: #d8dbe0;
}

.m-cap-box {
    width: 28px;
    height: 28px;
    border: 2px solid #5a6575;
    background: #fff;
    border-radius: 3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-cap-box i {
    color: #3e74ff; /* Standard captcha blue check */
    font-size: 18px;
}

/* 7. SUBMIT BUTTON */
.m-submit {
    width: 100%;
    height: 54px;
    background: #854dff !important; /* Exact purple from image */
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.m-submit:hover {
    background: #9264ff !important;
    transform: translateY(-1px);
}

/* 8. CLOSE BUTTON */
.m-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #909bb7;
    font-size: 18px;
    cursor: pointer;
}

.m-close:hover {
    color: #ffffff;
}

/* TnC Text Adjustment */
.m-tnc {
    font-size: 11px;
    color: #909bb7;
    line-height: 1.5;
    margin-bottom: 20px !important;
}

.m-asterisk {
    color: #ff9d4d;
}