/* --- Global Poppins & Transitions --- */
.ucm-modal-overlay, .ee-coupon-ribbon, .ucm-course-coupon-tag, .ucm-floating-coupon {
    font-family: 'Poppins', sans-serif !important;
    box-sizing: border-box;
}

/* --- FIX: Celebration Animation Layering --- */
#ucm-confetti-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483647 !important; /* Forces confetti above everything */
    pointer-events: none !important; /* Allows clicking the modal through the confetti */
    display: block !important;
}

/* --- Listing Card Ribbons --- */
.ee-coupon-ribbon {
    position: absolute;
    top: 15px;
    right: -8px;
    background: #0369a1;
    color: #ffffff;
    padding: 6px 15px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 4px 0 0 4px;
    z-index: 10;
    box-shadow: -2px 4px 10px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
}

/* --- Hero Section Badge --- */
.ucm-course-coupon-tag {
    background: #0369a1;
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(3, 105, 161, 0.4);
}

/* --- Lead Capture Modal Overlay --- */
.ucm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 26, 51, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(5px);
}

.ucm-modal-content {
    background: #ffffff;
    width: 95%;
    max-width: 550px; /* Refined width for new layout */
    border-radius: 24px;
    position: relative;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: ucmModalSlide 0.4s ease-out;
}

@keyframes ucmModalSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ucm-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: #64748b;
}

/* --- Form Row & Input Group Hierarchy --- */
.ucm-form-row { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 15px; 
}

.ucm-form-row.single {
    display: block;
}

.ucm-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ucm-input-group label {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 2px;
}

/* --- Uniform Form Elements --- */
.ucm-modal-content input, 
.ucm-modal-content select {
    width: 100%;
    height: 48px; /* Standardized height */
    padding: 0 15px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    color: #1e293b;
}

.ucm-modal-content input:focus { 
    border-color: #0369a1; 
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(3, 105, 161, 0.1); 
}

/* --- NEW: Mobile Number Split & Flag UI --- */
.ucm-phone-split {
    display: flex;
    gap: 8px;
    align-items: center;
}

#ucm_country_code.ucm-flag-select {
    width: 110px !important; /* Wider for flag visibility */
    flex-shrink: 0;
    padding-left: 8px !important;
    cursor: pointer;
    font-size: 13px !important;
    background-color: #f8fafc !important;
}

/* Adjusting the mobile input width when paired with flag select */
.ucm-phone-split input[type="tel"] {
    flex-grow: 1;
}

/* --- Course Search Suggestions Dropdown --- */
.ucm-suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-top: 5px;
}

.ucm-course-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    transition: 0.2s;
}

.ucm-course-item:hover {
    background: #f0f9ff;
    color: #0369a1;
    padding-left: 20px;
}

/* --- Dynamic Claim Button --- */
.ucm-btn-claim {
    width: 100%;
    background: #0369a1;
    color: #fff;
    padding: 16px;
    border-radius: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    font-size: 16px;
    transition: 0.3s;
}
.ucm-btn-claim:hover { background: #075985; transform: translateY(-2px); }

/* --- Reveal Step Styles --- */
.ucm-code-box {
    margin: 25px 0;
    border: 2px dashed #0369a1;
    background: #f0f9ff;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#ucm-final-code {
    font-size: 32px;
    font-weight: 900;
    color: #0369a1;
    letter-spacing: 4px;
}

.ucm-btn-copy {
    background: #0f172a;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.ucm-btn-copy.copied { background: #059669 !important; }

.ucm-status-tag {
    background: #dcfce7;
    color: #166534;
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 700;
}

/* --- Mobile Compatibility --- */
@media (max-width: 600px) {
    .ucm-modal-content { padding: 30px 20px; width: 92%; }
    .ucm-form-row { flex-direction: column; gap: 15px; }
    #ucm_country_code.ucm-flag-select { width: 95px !important; }
}

/* --- MSG91 OTP UI Enhancements --- */
#ucm_otp_input {
    letter-spacing: 8px;
    text-indent: 8px;
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
}

#ucm-otp-section {
    animation: ucmFadeIn 0.3s ease-in;
}

@keyframes ucmFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#ucm-timer-count {
    font-weight: 800;
    color: #ff7a1a;
}

.ucm-secure-note {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 15px;
    text-align: center;
}

/* Force Flags to be visible */
#ucm_country_code.ucm-flag-select {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Poppins", sans-serif !important;
    width: 125px !important; /* Slightly wider to prevent text wrapping */
    font-size: 16px !important; /* Larger size makes flags easier to see */
    appearance: none; /* Removes default browser styling for a cleaner look */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364748b%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

/* Ensure the container doesn't cut off the flags */
.ucm-phone-split {
    overflow: visible !important;
}