.lead-form-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    backdrop-filter: blur(4px);
}
.lead-form-overlay.active {
    display: block;
}

.lead-form-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 92%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(145deg, #1a1225, #0d0b14);
    border: 1px solid rgba(255, 215, 140, 0.15);
    border-radius: 20px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(201, 149, 46, 0.08);
}
.lead-form-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.lead-form-header {
    padding: 28px 24px 12px;
    text-align: center;
    position: relative;
}
.lead-form-header h2 {
    margin: 0 0 6px;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: #ffd98c;
    font-weight: 600;
}
.lead-form-header p {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: "Inter", sans-serif;
}
.lead-form-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.lead-form-close:hover {
    color: #ffd98c;
    background: rgba(255, 215, 140, 0.1);
}

#leadCaptureForm {
    padding: 8px 24px 20px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: "Inter", sans-serif;
    font-weight: 500;
}
.form-group .required {
    color: #ff6b6b;
}
.form-group .optional {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.92rem;
    font-family: "Inter", sans-serif;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 215, 140, 0.12);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(255, 215, 140, 0.4);
    background: rgba(255, 255, 255, 0.08);
}
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23ffd98c'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.form-group select option {
    background: #1a1225;
    color: #fff;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.form-group input.field-error,
.form-group select.field-error,
.form-group textarea.field-error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.06);
}
.form-error {
    display: block;
    font-size: 0.78rem;
    color: #ff6b6b;
    margin-top: 4px;
    min-height: 18px;
    font-family: "Inter", sans-serif;
}

.form-submit-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    color: #0d0b14;
    background: linear-gradient(135deg, #ffd98c, #e8b74a);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 4px;
}
.form-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 140, 0.25);
}
.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-privacy {
    text-align: center;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 12px;
    font-family: "Inter", sans-serif;
}

.form-success {
    text-align: center;
    padding: 30px 24px 24px;
}
.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    animation: successPop 0.4s ease;
}
@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.form-success h3 {
    margin: 0 0 8px;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    color: #ffd98c;
}
.form-success p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: "Inter", sans-serif;
}
.lead-id-display {
    font-family: monospace;
    color: #ffd98c !important;
    font-size: 0.85rem !important;
    background: rgba(255, 215, 140, 0.08);
    padding: 6px 14px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 8px !important;
}

.lead-form-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    color: #0d0b14;
    background: linear-gradient(135deg, #ffd98c, #e8b74a);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.lead-form-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 140, 0.25);
}

@media (max-width: 600px) {
    .lead-form-modal {
        width: 96%;
        max-height: 95vh;
        border-radius: 16px;
    }
    #leadCaptureForm {
        padding: 6px 16px 16px;
    }
    .lead-form-header {
        padding: 22px 16px 8px;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }
}
