/* =========================================
   Lead Capture Form Styles
   ========================================= */

/* Modal Overlay */
.lead-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lead-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Modal Container */
.lead-modal {
    background: #0f172a;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(2, 132, 199, 0.1);
    padding: 40px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.lead-modal-overlay.active .lead-modal {
    transform: translateY(0) scale(1);
}

/* Close Button */
.lead-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lead-modal-close:hover {
    color: #fff;
}

/* Header */
.lead-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.lead-modal-header h3 {
    font-family: var(--font-heading, 'Outfit', 'Montserrat', sans-serif);
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.lead-modal-header p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form Steps */
.lead-step {
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.4s ease;
    margin-bottom: 24px;
    position: relative;
}

.lead-step.active {
    opacity: 1;
    pointer-events: all;
}

.lead-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.2);
    border: 1px solid #0284c7;
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.lead-step.active .step-number {
    background: #0284c7;
    color: #fff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.lead-step.completed .step-number {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.lead-step-title {
    color: #f8fafc;
    font-weight: 600;
    font-size: 1rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-label {
    display: block;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #38bdf8;
    background: rgba(2, 6, 23, 0.8);
    box-shadow: inset 0 0 0 1px #38bdf8, 0 0 10px rgba(56, 189, 248, 0.2);
}

.form-control::placeholder {
    color: #475569;
}

/* CEP Input Group */
.cep-group {
    display: flex;
    gap: 10px;
}

.cep-group .form-control {
    flex: 1;
}

.btn-cep {
    background: rgba(2, 132, 199, 0.2);
    border: 1px solid #0284c7;
    color: #38bdf8;
    border-radius: 8px;
    padding: 0 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cep:hover {
    background: #0284c7;
    color: #fff;
}

.btn-cep.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Manual Address Toggle */
.manual-address-toggle {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 16px;
}

.manual-address-toggle a {
    color: #38bdf8;
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
}

#address-fields {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

#address-fields.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Submit Section */
.lead-submit {
    margin-top: 32px;
    text-align: center;
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.4s ease;
}

.lead-submit.active {
    opacity: 1;
    pointer-events: all;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #0056b3 100%);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.5);
}

.btn-submit:disabled {
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.privacy-note {
    margin-top: 16px;
    font-size: 0.75rem;
    color: #64748b;
}

.privacy-note i {
    color: #22c55e;
}

/* Error states */
.form-control.error {
    border-color: #ef4444;
}

.error-msg {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 4px;
    display: none;
}

.form-control.error+.error-msg {
    display: block;
}

/* Scrollbar styling for modal */
.lead-modal::-webkit-scrollbar {
    width: 6px;
}

.lead-modal::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.5);
    border-radius: 10px;
}

.lead-modal::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 10px;
}

.lead-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .lead-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
        padding: 30px 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}