/**
 * Lead Capture Popup Styles
 * Modern, attractive, and responsive design
 */

/* Overlay */
.lead-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

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

/* Popup Container */
.lead-popup-container {
    background: #ffffff;
    border-radius: 20px;
    max-width: 850px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

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

/* Custom Scrollbar */
.lead-popup-container::-webkit-scrollbar {
    width: 8px;
}

.lead-popup-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.lead-popup-container::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 10px;
}

.lead-popup-container::-webkit-scrollbar-thumb:hover {
    background: #ffb700;
}

/* Close Button */
.lead-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.lead-popup-close:hover {
    background: #ff4444;
    color: white;
    transform: rotate(90deg);
}

/* Header */
.lead-popup-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 40%, #1e40af 100%);
    color: #000;
    padding: 40px 30px 30px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.lead-popup-header i {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.lead-popup-header h2 {
    font-size: 28px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

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

/* Form */
.lead-popup-form {
    padding: 30px;
}

.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.form-section h3 i {
    color: #ffd700;
    font-size: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group .required {
    color: #ff4444;
    margin-left: 3px;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Radio buttons for gender */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ffd700;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-submit {
    width: 100%;
    max-width: 400px;
    padding: 16px 30px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.5);
}

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

/* Loading Indicator */
.form-loading {
    text-align: center;
    padding: 20px;
    color: #1e40af;
    font-weight: 600;
}

.form-loading i {
    margin-right: 8px;
    font-size: 20px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 60px 30px;
}

.success-message i {
    font-size: 80px;
    color: #4caf50;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-message h3 {
    font-size: 28px;
    color: #333;
    margin: 0 0 15px 0;
}

.success-message p {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.btn-close-success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .lead-popup-container {
        max-width: 95%;
        max-height: 85vh;
        border-radius: 15px;
    }

    .lead-popup-header {
        padding: 30px 20px 25px;
    }

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

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

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-section h3 {
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-skip {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .lead-popup-header {
        padding: 25px 15px 20px;
    }

    .lead-popup-header i {
        font-size: 36px;
    }

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

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

    .success-message i {
        font-size: 60px;
    }

    .success-message h3 {
        font-size: 22px;
    }
}

/* Animation for form validation errors */
.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown) {
    border-color: #ff4444;
}

.form-group input:valid:not(:placeholder-shown),
.form-group select:valid:not(:placeholder-shown) {
    border-color: #ffd700;
}

/* Accessibility */
.lead-popup-overlay:focus-within {
    outline: none;
}

.lead-popup-container *:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .lead-popup-overlay {
        display: none !important;
    }
}

