/*
 * mbilletech Registration Control - Unified Frontend Styling
 * Focus: Modern, Universal Mobile-Responsive (1080px, 768px, 720px, 520px, 480px)
 * Supports: Registration, Dual-Vector Login, and Password Recovery Forms
 */

/* Main Container - Used for all shortcodes */
.mbilletech-form-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
    width: 100%;
}

.mbilletech-dual-login-container {
    max-width: 480px; /* Slightly narrower for modern login screens */
}

.mbilletech-form-container h2 {
    text-align: center;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.75rem;
    font-weight: 800;
}

/* Section Titles for Dual Login */
.mbilletech-section-title {
    font-size: 1.25rem !important;
    color: #1e293b !important;
    text-align: left !important;
    margin-bottom: 10px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mbilletech-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.mb-icon {
    font-size: 1.2rem;
}

/* Form Group Layout */
.mbilletech-form-group {
    margin-bottom: 18px;
}

.mbilletech-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #334155;
    font-size: 14px;
}

.mbilletech-form-group label .required {
    color: #dc2626;
}

.mb-optional {
    font-weight: normal;
    color: #64748b;
    font-size: 0.85em;
}

/* Unified Input Styling */
.mbilletech-form-container input[type="text"],
.mbilletech-form-container input[type="email"],
.mbilletech-form-container input[type="password"],
.mbilletech-form-container input[type="tel"],
.mbilletech-form-container select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #0f172a;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-weight: 500;
}

/* Problem 4-iii: Long digit EducMaster input style */
.mb-educmaster-input {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
    font-weight: 700 !important;
}

.mbilletech-form-container input:focus,
.mbilletech-form-container select:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Flex Row for Side-by-Side Fields */
.mbilletech-form-row {
    display: flex;
    gap: 15px;
}

.mbilletech-form-row .mbilletech-form-group {
    flex: 1;
    margin-bottom: 15px;
}

/* Remember Me & Forgot Password Row */
.mbilletech-remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.mbilletech-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
    color: #475569 !important;
    margin: 0 !important;
}

.mbilletech-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.mbilletech-forgot-link {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.mbilletech-forgot-link:hover {
    text-decoration: underline;
}

/* Conditional Sections Styling */
.mbilletech-conditional-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    margin-bottom: 25px;
    display: none;
}

.mbilletech-conditional-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Method Selector Buttons */
.mbilletech-method-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.mb-method-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    background-color: #ffffff;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    text-align: left;
}

.mb-method-btn:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.mb-method-btn .mb-icon {
    font-size: 1.4rem;
}

/* Back Button for Login Views */
.mb-back-to-methods {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.mb-back-to-methods:hover {
    color: #0f172a;
    text-decoration: underline;
}

/* 14-Day Provisional Warning Alert */
.mbilletech-provisional-warning {
    background: #fff8e5;
    border-left: 4px solid #ffb900;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 13.5px;
    color: #515151;
    line-height: 1.5;
}

.mbilletech-provisional-warning strong {
    color: #856404;
    display: block;
    margin-bottom: 5px;
    font-size: 14.5px;
}

/* Unified Submit Buttons */
.mbilletech-submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mbilletech-submit-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.mbilletech-submit-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* Custom WhatsApp Button */
.mb-btn-whatsapp {
    background-color: #16a34a;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}

.mb-btn-whatsapp:hover {
    background-color: #15803d;
}

/* Custom Classic Fallback Button */
.mb-btn-fallback {
    background-color: #475569;
}

.mb-btn-fallback:hover {
    background-color: #334155;
}

/* Text Button */
.mbilletech-text-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
}

.mbilletech-text-btn:hover {
    color: #0f172a;
    text-decoration: underline;
}

/* Specific OTP Input Styling */
.mb-otp-input {
    text-align: center;
    letter-spacing: 12px;
    font-size: 24px !important;
    font-weight: 900 !important;
    padding: 15px !important;
}

.mb-otp-input::placeholder {
    letter-spacing: 5px;
    font-size: 16px;
    font-weight: normal;
    color: #cbd5e1;
}

/* Visual Divider */
.mbilletech-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
}

.mbilletech-divider::before,
.mbilletech-divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid #e2e8f0;
}

.mbilletech-divider-text {
    padding: 0 15px;
    color: #94a3b8;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Alerts and Notices */
.mbilletech-frontend-notice,
.mbilletech-alert {
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
    word-wrap: break-word;
}

.mbilletech-alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.mbilletech-alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* International Telephone Input Overrides */
.iti {
    width: 100%;
    display: block;
}

.iti__flag-container {
    padding: 2px;
}

.iti__selected-flag {
    background-color: transparent !important;
    border-right: 1px solid #e2e8f0;
    padding: 0 12px !important;
}

.mb-phone-input {
    padding-left: 60px !important;
}

/* ==============================================================================
 * PROBLEM 5: UNIVERSAL MOBILE RESPONSIVENESS BREAKPOINTS
 * ============================================================================== */

/* 1080px Desktop / Laptop Fluid Adjustments */
@media screen and (max-width: 1080px) {
    .mbilletech-form-container {
        max-width: 580px;
    }
}

/* 768px & 720px Tablet Adjustments */
@media screen and (max-width: 768px) {
    .mbilletech-form-container {
        max-width: 92%;
        padding: 25px;
    }
}

@media screen and (max-width: 720px) {
    .mbilletech-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* 520px Smartphone Large Adjustments */
@media screen and (max-width: 520px) {
    .mbilletech-form-container {
        padding: 20px 18px;
        border-radius: 10px;
    }

    .mb-method-btn {
        font-size: 14px;
        padding: 13px 15px;
    }

    .mbilletech-remember-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 480px Smartphone Standard Adjustments (Strict Mobile Anti-Zoom & Touch Targets) */
@media screen and (max-width: 480px) {
    .mbilletech-form-container {
        padding: 18px 12px;
        margin: 0 auto;
        box-shadow: none; 
        border: none;
        border-radius: 0;
    }

    .mbilletech-form-container h2 {
        font-size: 1.35rem;
        margin-bottom: 18px;
    }

    .mbilletech-form-group {
        margin-bottom: 14px;
    }

    /* Anti-zoom rule for mobile iOS browsers (16px base font size) */
    .mbilletech-form-container input[type="text"],
    .mbilletech-form-container input[type="email"],
    .mbilletech-form-container input[type="password"],
    .mbilletech-form-container input[type="tel"],
    .mbilletech-form-container select {
        padding: 12px;
        font-size: 16px !important; 
    }

    .mbilletech-conditional-section {
        padding: 14px;
        margin-bottom: 18px;
    }

    .mbilletech-submit-btn {
        padding: 15px; 
        font-size: 16px;
    }

    .mb-otp-input {
        letter-spacing: 6px;
        font-size: 20px !important;
    }
}