/* ===========================
   LEAD CAPTURE COMPONENT
   Last Updated: January 14, 2025
   =========================== */

/* Modal Overlay */
.lead-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 126, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.lead-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Card */
.lead-modal {
    background: var(--color-white);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 440px;
    width: 90%;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 200, 83, 0.1);
}

.lead-modal-overlay.active .lead-modal {
    transform: translateY(0) scale(1);
}

/* Close Button */
.lead-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-light-gray);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-medium-gray);
    transition: all 0.3s ease;
}

.lead-modal-close:hover {
    background: var(--color-navy);
    color: var(--color-white);
    transform: rotate(90deg);
}

/* Modal Header */
.lead-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.lead-modal-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-orange) 0%, #E65100 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    animation: iconPulse 2s ease-in-out infinite;
}

.lead-modal-icon i {
    font-size: 2rem;
    color: white;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 111, 0, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 111, 0, 0); }
}

.lead-modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.lead-modal-subtitle {
    font-size: 1rem;
    color: var(--color-medium-gray);
    margin: 0;
}

/* Highlight text */
.text-highlight {
    color: var(--color-primary-green);
    font-weight: 700;
}

/* Form Styles */
.lead-form {
    margin-bottom: 1.5rem;
}

.lead-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.lead-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.lead-input:focus {
    outline: none;
    border-color: var(--color-primary-green);
    box-shadow: 0 0 0 4px rgba(0, 200, 83, 0.1);
}

.lead-input::placeholder {
    color: #999;
}

.lead-submit-btn {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary-green) 0%, var(--color-primary-green-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.lead-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
}

.lead-form-note {
    font-size: 0.8rem;
    color: var(--color-medium-gray);
    margin: 0;
}

/* Divider */
.lead-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.lead-divider-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.lead-divider-text {
    font-size: 0.875rem;
    color: var(--color-medium-gray);
    font-weight: 600;
}

/* WhatsApp Button */
.lead-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lead-whatsapp-btn:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.lead-whatsapp-btn i {
    font-size: 1.5rem;
}

/* Success State */
.lead-success {
    text-align: center;
    padding: 1rem 0;
}

.lead-success-icon {
    width: 60px;
    height: 60px;
    background: var(--color-primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.lead-success-icon i {
    font-size: 1.75rem;
    color: white;
}

.lead-success-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.lead-success-subtext {
    font-size: 0.95rem;
    color: var(--color-medium-gray);
    margin: 0;
}

/* ===========================
   FLOATING BUTTON (Minimized State)
   =========================== */
.lead-float-btn {
    position: fixed;
    bottom: 100px; /* Above back-to-top button */
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-orange) 0%, #E65100 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 20px rgba(255, 111, 0, 0.4),
        0 0 0 0 rgba(255, 111, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lead-float-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    animation: floatBtnPulse 3s ease-in-out infinite;
}

@keyframes floatBtnPulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(255, 111, 0, 0.4), 0 0 0 0 rgba(255, 111, 0, 0.4);
    }
    50% { 
        box-shadow: 0 6px 30px rgba(255, 111, 0, 0.5), 0 0 0 12px rgba(255, 111, 0, 0);
    }
}

.lead-float-btn:hover {
    transform: scale(1.1);
    animation: none;
    box-shadow: 0 8px 30px rgba(255, 111, 0, 0.5);
}

.lead-float-btn i {
    font-size: 1.75rem;
    color: white;
}

/* Notification Badge */
.lead-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--color-primary-green);
    border-radius: 50%;
    border: 3px solid white;
    animation: badgeBounce 1.5s ease-in-out infinite;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Tooltip on hover */
.lead-float-tooltip {
    position: absolute;
    right: 75px;
    background: var(--color-navy);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.lead-float-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid var(--color-navy);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.lead-float-btn:hover .lead-float-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lead-modal {
        padding: 2rem 1.5rem;
        max-width: 95%;
    }
    
    .lead-modal-title {
        font-size: 1.25rem;
    }
    
    .lead-input-group {
        flex-direction: column;
    }
    
    .lead-submit-btn {
        width: 100%;
    }
    
    .lead-float-btn {
        bottom: 85px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .lead-float-btn i {
        font-size: 1.5rem;
    }
    
    .lead-float-tooltip {
        display: none;
    }
}
