/* Medicare Lead Form Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
    position: relative;
}

h1 {
    text-align: center;
    color: #1a5276;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

/* Status Bar */
.status-bar {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 0.95rem;
}

.status-bar.hidden {
    display: none;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Fieldsets */
fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
}

legend {
    font-weight: 600;
    color: #2980b9;
    padding: 0 10px;
    font-size: 1.05rem;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group.full-width {
    flex-basis: 100%;
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
}

.req {
    color: #e74c3c;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

input[readonly] {
    background: #f5f5f5;
    color: #888;
}

/* Field Error */
.field-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    padding: 20px 0;
}

.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #219a52;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Result Boxes */
.result-box {
    margin-bottom: 20px;
}

.result-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    color: #155724;
}

.result-success h3 {
    color: #155724;
    margin-bottom: 10px;
}

.result-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    color: #721c24;
}

.result-error h3 {
    color: #721c24;
    margin-bottom: 10px;
}

.result-box a {
    color: inherit;
    text-decoration: underline;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #fff;
    margin-top: 16px;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        margin: 10px auto;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    h1 {
        font-size: 1.4rem;
    }
}
