/* Popup Lead Styles */
.popup-lead-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.popup-lead-container {
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

.popup-lead-content {
    position: relative;
    padding: 0;
}

.popup-lead-header {
    background: linear-gradient(135deg, #d54733, #e74c3c);
    color: white;
    text-align: center;
    padding: 20px 15px;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.popup-lead-close {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.popup-lead-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.popup-lead-logo img {
    max-height: 35px;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
}

.popup-lead-header h2 {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-lead-header p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

.popup-lead-form {
    padding: 30px;
    position: relative;
}

.popup-lead-form .form-group {
    margin-bottom: 20px;
}

.popup-lead-form label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.popup-lead-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
}

.popup-lead-form .form-control:focus {
    border-color: #3c8dbc;
    box-shadow: 0 0 0 0.2rem rgba(60, 141, 188, 0.25);
    background: #fff;
    outline: none;
}

.popup-lead-form .form-control::placeholder {
    color: #999;
    font-style: italic;
}

.btn-popup-submit {
    width: 100%;
    background: linear-gradient(135deg, #d54733, #e74c3c);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.btn-popup-submit:hover {
    background: linear-gradient(135deg, #a93026, #d54733);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(213, 71, 51, 0.3);
}

.btn-popup-submit:active {
    transform: translateY(0);
}

.btn-popup-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.popup-lead-note {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.popup-lead-note p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.popup-lead-note i {
    color: #d54733;
    margin-right: 5px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .popup-lead-container {
        width: 100%;
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .popup-lead-form {
        padding: 15px;
    }

    /* Reset all Bootstrap column classes to full width */
    .popup-lead-form .col-md-4,
    .popup-lead-form .col-md-6,
    .popup-lead-form .col-md-8,
    .popup-lead-form .col-md-12 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0 !important;
    }

    /* Force form rows to stack vertically */
    .popup-lead-form .form-row {
        display: block !important;
        margin: 0 !important;
    }

    /* Ensure each form group takes full width */
    .popup-lead-form .form-group {
        width: 100% !important;
        margin-bottom: 15px !important;
        padding: 0 !important;
    }

    /* Make all inputs full width */
    .popup-lead-form .form-control {
        width: 100% !important;
        display: block !important;
    }

    .popup-lead-header h2 {
        font-size: 20px;
    }

    .popup-lead-header p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .popup-lead-container {
        margin: 5px;
        max-width: calc(100% - 10px);
    }
}

/* Bootstrap form overrides for popup */
.popup-lead-form .form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -5px;
    margin-left: -5px;
}

.popup-lead-form .form-row > .col-md-12,
.popup-lead-form .form-row > .col-md-6,
.popup-lead-form .form-row > .col-md-8,
.popup-lead-form .form-row > .col-md-4 {
    padding-right: 5px;
    padding-left: 5px;
}

.popup-lead-form .form-row > .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.popup-lead-form .form-row > .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.popup-lead-form .form-row > .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.popup-lead-form .form-row > .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

/* Error Alert Styles */
.popup-error-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #b91c1c;
    display: flex;
    align-items: center;
    animation: slideInError 0.3s ease-out;
}

.popup-error-alert i {
    margin-right: 8px;
    font-size: 16px;
    color: #dc2626;
}

@keyframes slideInError {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* State Container for Loading/Success */
.popup-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 380px;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

/* Loading State */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f0f0f0;
    border-top: 5px solid #d54733;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 25px;
}

.loading-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.loading-message {
    font-size: 15px;
    color: #6c757d;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success State */
.success-icon {
    width: 70px;
    height: 70px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 32px;
    animation: popIn 0.4s 0.1s ease-out forwards;
    transform: scale(0);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.success-message {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

