/* ==========================
   BASE FORM CONTAINER
========================== */

#leadForm {
    max-width: 1024px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eef2f7;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ==========================
   ROW LAYOUT
========================== */

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* ==========================
   FORM GROUP
========================== */

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

/* ==========================
   LABELS
========================== */

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

/* ==========================
   INPUTS & SELECTS
========================== */

#leadForm .form-group input,
#leadForm .form-group select {
    padding: 12px 14px;
    border: 1px solid #d6dbe3;
    border-radius: 14px;
    font-size: 14px;
    margin-top: 6px;
    background: #fff;
    transition: all 0.25s ease;
}

/* Hover */
#leadForm .form-group input:hover,
#leadForm .form-group select:hover {
    border-color: #94a3b8;
}

/* Focus */
#leadForm .form-group input:focus,
#leadForm .form-group select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

/* Disabled */
#leadForm .form-group select:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

/* ==========================
   ERROR TEXT
========================== */

.formerror {
    padding-top: 6px;
    font-size: 13px;
    color: #dc2626;
    font-weight: 500;
}

/* ==========================
   SUBMIT BUTTON (PREMIUM CTA)
========================== */

.submit-btn,
#submitBtn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 10px;
    position: relative;
}

/* Hover */
.submit-btn:hover,
#submitBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37,99,235,0.25);
}

/* Active */
.submit-btn:active,
#submitBtn:active {
    transform: translateY(0);
}

/* Disabled */
.submit-btn:disabled,
#submitBtn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* Loading state */
#submitBtn.loading {
    color: transparent;
}

#submitBtn.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================
   MESSAGE BOX
========================== */

#form-message {
    display: none;
    padding: 14px;
    margin-top: 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

#form-message.success {
    display: block;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

#form-message.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================
   RESPONSIVE DESIGN
========================== */

/* Tablet */
@media (max-width: 1024px) {
    #leadForm {
        margin: 20px;
        padding: 30px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    #leadForm {
        padding: 20px;
        border-radius: 16px;
    }

    .form-group input,
    .form-group select {
        font-size: 15px;
    }
}

/* Prevent overflow */
html, body {
    overflow-x: hidden;
}