@import url('energy_calculator.css');

.lead-form-page {
    background: transparent;
    min-height: 100vh;
}

.lead-card {
    padding: 2.5rem;
    max-width: 840px;
    margin: 0 auto 3rem;
}

.lead-card__logo {
    display: block;
    margin: 0 auto 2rem;
    max-width: 220px;
    width: 100%;
    height: auto;
}

.lead-card--submitted .card-title,
.lead-card--submitted .card-intro,
.lead-card--submitted .lead-progress {
    display: none;
}

.card-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card-intro {
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.lead-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.lead-progress__step {
    flex: 1;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lead-progress__step.is-active {
    opacity: 1;
    transform: translateY(-2px);
}

.lead-progress__number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #0f766e;
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.lead-progress__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
}

.lead-form {
    display: block;
}

.lead-form__content {
    display: block;
}

.lead-form.is-submitted .lead-form__content {
    display: none;
}

.lead-card--submitted #form-success {
    text-align: center;
}

.lead-step {
    display: none;
}

.lead-step.is-active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lead-step__title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: #0f172a;
}

.lead-step__note {
    margin-bottom: 1.5rem;
    color: #475569;
}

.lead-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.lead-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #111827;
}

.lead-field span {
    font-weight: 600;
}

.lead-field__optional {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.85rem;
    margin-left: 0.35rem;
}

.lead-field input,
.lead-field select,
.lead-field textarea {
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
    outline: none;
}

.lead-field textarea {
    resize: vertical;
    min-height: 140px;
}

.lead-field--full {
    grid-column: 1 / -1;
}

.lead-field__hint {
    font-size: 0.85rem;
    color: #6b7280;
}

.lead-field__error {
    font-size: 0.85rem;
    color: #b91c1c;
    min-height: 1.1em;
}

.lead-alert {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.lead-alert--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
}

.lead-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.lead-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.lead-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    border: none;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.lead-button--primary {
    background: #0f766e;
    color: #fff;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.25);
}

.lead-button--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(15, 118, 110, 0.3);
}

.lead-button--ghost {
    background: transparent;
    color: #0f172a;
    border: 1px solid #cbd5f5;
}

.lead-button__spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.lead-button.is-loading .lead-button__spinner {
    display: inline-block;
}

.lead-button.is-loading .lead-button__label {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .lead-card {
        padding: 2rem 1.5rem;
    }

    .lead-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .lead-button {
        width: 100%;
        justify-content: center;
    }
}
