/* ========= СТРАНИЦА ЗАЯВКИ ========= */
.lead-page {
    padding: 40px 0 80px;
}

.lead-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
}

/* Индикатор шагов */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 60px;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: all 0.3s;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.step.active .step-number {
    background: linear-gradient(135deg, #2a7d2e, #3fbf6b);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(42, 125, 46, 0.3);
}

.step-name {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
}

.step.active .step-name {
    color: #2a7d2e;
    font-weight: 600;
}

.step-content {
    display: none !important;
}

.step-content.active {
    display: block !important;
}

/* Выбранная услуга - бейдж */
.selected-service-badge {
    margin-bottom: 25px;
}

.selected-service-badge .alert {
    border-left: 4px solid #2a7d2e;
    border-radius: 10px;
    padding: 15px 20px;
}

/* Поиск */
.service-search {
    margin-bottom: 25px;
}

.search-wrapper {
    position: relative;
}

.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
}

.search-clear:hover {
    background: #e9ecef;
    color: #343a40;
}

/* Сетка услуг - новая структура */
.services-grid-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #2a7d2e #e9ecef;
}

.services-grid-container::-webkit-scrollbar {
    width: 8px;
}

.services-grid-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.services-grid-container::-webkit-scrollbar-thumb {
    background: #2a7d2e;
    border-radius: 10px;
}

.services-grid-container::-webkit-scrollbar-thumb:hover {
    background: #1e5c21;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 5px;
}

/* Карточка услуги */
.service-item {
    width: 100%;
    transition: all 0.3s ease;
}

.service-item.hidden {
    display: none;
}

.service-option {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;
    overflow: hidden;
}

.service-option:hover {
    border-color: #2a7d2e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(42, 125, 46, 0.1);
}

.service-option.selected {
    border-color: #2a7d2e;
    background-color: rgba(42, 125, 46, 0.02);
    box-shadow: 0 0 0 3px rgba(42, 125, 46, 0.1);
}

.service-option.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #2a7d2e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.service-icon {
    font-size: 2.2rem;
    color: #2a7d2e;
    margin-bottom: 15px;
    text-align: center;
}

.service-info {
    flex: 1;
    margin-bottom: 15px;
}

.service-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #212529;
    line-height: 1.3;
}

.service-description {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-price-tag {
    font-weight: 700;
    color: #2a7d2e;
    font-size: 1.1rem;
    background: rgba(42, 125, 46, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
}

.service-select-btn {
    text-align: center;
    margin-top: 5px;
}

.service-select-btn .btn {
    width: 100%;
    padding: 8px;
    font-size: 0.9rem;
}

/* Кнопка "Далее" - всегда видна */
.next-step-container {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 20px 0 0;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    z-index: 10;
}

.next-step-btn {
    min-width: 250px;
    padding: 12px 30px;
}

/* Страница успеха */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 5rem;
    color: #2a7d2e;
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .lead-card {
        padding: 25px;
    }

    .step-indicator {
        gap: 30px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-name {
        font-size: 0.8rem;
        white-space: normal;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .service-option {
        padding: 15px;
    }

    .service-icon {
        font-size: 2rem;
    }

    .service-title {
        font-size: 1rem;
    }

    .next-step-btn {
        min-width: 200px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .lead-page {
        padding: 20px 0 40px;
    }

    .lead-card {
        padding: 20px;
    }

    .step-indicator {
        gap: 15px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Множественный выбор услуг */
.service-option {
    position: relative;
    padding-left: 50px; /* Место для чекбокса */
}

.service-checkbox {
    position: absolute;
    left: 15px;
    top: 20px;
    z-index: 2;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.service-option.selected .checkbox-custom {
    border-color: #2a7d2e;
    background-color: #2a7d2e;
}

.service-option.selected .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.service-option.selected {
    border-color: #2a7d2e;
    background-color: rgba(42, 125, 46, 0.02);
    box-shadow: 0 0 0 3px rgba(42, 125, 46, 0.1);
}

/* Бейдж с выбранными услугами */
.selected-services-badge {
    margin-bottom: 25px;
}

.selected-services-badge .alert {
    border-left: 4px solid #2a7d2e;
    border-radius: 10px;
    padding: 15px 20px;
}

.selected-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.selected-service-tag {
    background: white;
    border: 1px solid #2a7d2e;
    color: #2a7d2e;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.selected-service-tag .remove-service {
    cursor: pointer;
    width: 18px;
    height: 18px;
    background: #2a7d2e;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.selected-service-tag .remove-service:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Список выбранных услуг в форме */
.selected-services-info {
    border-left: 4px solid #2a7d2e;
}

.selected-services-info ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.selected-services-info li {
    padding: 8px 0;
    border-bottom: 1px dashed #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-services-info li:last-child {
    border-bottom: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .service-option {
        padding-left: 45px;
    }

    .service-checkbox {
        left: 12px;
        top: 15px;
    }

    .checkbox-custom {
        width: 20px;
        height: 20px;
    }

    .selected-service-tag {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}