/* Phase 5 — Lead Machine */

.lead-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.lead-modal[hidden] {
    display: none !important;
}

.lead-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 46, .55);
}

.lead-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .18);
}

.lead-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

.lead-modal-title {
    font-family: 'Loos Normal', sans-serif;
    font-size: clamp(22px, 2.5vw, 28px);
    margin: 0 0 8px;
}

.lead-modal-subtitle {
    margin: 0 0 20px;
    color: #555;
    font-size: 15px;
    line-height: 150%;
}

.lead-field {
    margin-bottom: 14px;
}

.lead-label,
.podbor-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.lead-field input,
.lead-field select,
.podbor-field input,
.podbor-field select,
.podbor-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.lead-modal-submit {
    width: 100%;
    margin-top: 8px;
}

.lead-form-note {
    margin: 12px 0 0;
    font-size: 15px;
    color: #4334A1;
}

html.lead-modal-open {
    overflow: hidden;
}

/* Catalog fallback */
.catalog-fallback-cta {
    padding: 48px 0;
    background: var(--cro-bg-soft, #f8f7fc);
}

.catalog-fallback-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 32px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}

.catalog-fallback-title {
    font-family: 'Loos Normal', sans-serif;
    font-size: clamp(22px, 2.5vw, 30px);
    margin: 0 0 8px;
}

.catalog-fallback-text p {
    margin: 0;
    color: #555;
    max-width: 560px;
}

/* Product lead block */
.product-lead-cta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-lead-cta .b-a-actions {
    flex-direction: column;
    align-items: stretch;
}

.product-lead-note {
    margin: 12px 0 0;
    font-size: 14px;
    color: #666;
}

.product-lead-section {
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.product-lead-section h2 {
    font-family: 'Loos Normal', sans-serif;
    font-size: clamp(22px, 2.5vw, 30px);
    margin: 0 0 12px;
}

.product-lead-section p {
    margin: 0 0 16px;
    color: #555;
    line-height: 160%;
    max-width: 720px;
}

/* Quiz */
.podbor-quiz-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.podbor-quiz-dot {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #e5e5e5;
}

.podbor-quiz-dot.is-active {
    background: #4334A1;
}

.podbor-quiz-step[hidden] {
    display: none !important;
}

.podbor-quiz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.podbor-quiz-option {
    font-size: 16px;
    color: #1a1a2e;
}

.podbor-quiz-option-text {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

/* Quiz layout — extended in ui-polish.css */

/* Exit hint */
.lead-exit-hint {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    z-index: 9990;
    max-width: 420px;
    margin: 0 auto;
}

.lead-exit-hint[hidden] {
    display: none !important;
}

.lead-exit-hint-inner {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
}

.lead-exit-hint-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
}

.lead-exit-hint-text {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 145%;
    padding-right: 24px;
}

.lead-exit-hint-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lead-exit-hint-actions .b-a-btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

/* Footer links Phase 5 */
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 32px;
    margin-bottom: 32px;
}

.footer-links-col-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
}

.footer-links-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links-col li {
    margin-bottom: 8px;
}

.footer-links-col a {
    font-size: 14px;
    color: inherit;
    text-decoration: none;
}

.footer-links-col a:hover {
    color: #4334A1;
}

.urgent-service-banner {
    margin: 24px 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, #4334A1 0%, #5B46D9 100%);
    border-radius: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.urgent-service-banner p {
    margin: 0;
    font-size: 16px;
}

.urgent-service-banner .b-a-btn {
    background: #fff;
    color: #4334A1;
}

@media (max-width: 1024px) {
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .catalog-fallback-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-fallback-inner .b-a-btn {
        width: 100%;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
    }

    .lead-exit-hint {
        bottom: 72px;
    }

    .sticky-cta-mobile {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}

@media (max-width: 430px) {
    .lead-modal-dialog {
        padding: 20px 16px 16px;
    }

    .podbor-quiz-actions .b-a-btn {
        width: 100%;
    }
}
