/* ============================================
   REQUEST SEARCH — Единый блок
   ============================================ */

/* Единый модуль */
.request-search-module {
    max-width: 1100px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border: 1px solid #eef2f8;
    border-radius: 28px;
    background: #ffffff;
    padding: 28px 30px 32px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Заголовок модуля */
.request-search-module-header {
    margin-bottom: 20px;
}
.request-search-module-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #0f1825;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
    margin-top: 0;
}

/* Подсказка */
.info-foruser {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2f8;
}
.info-foruser-text {
    color: #64748b;
    font-size: 15px;
    margin: 0;
}

/* Хлебные крошки */
.request-search-breadcrumb-wrapper {
    margin-bottom: 24px;
    border-bottom: 1px solid #eef2f8;
    padding-bottom: 12px;
}
.request-search-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    flex-wrap: wrap;
}
.request-search-breadcrumb a {
    text-decoration: none;
    color: #0595D6;
    transition: 0.2s;
    font-weight: 500;
}
.request-search-breadcrumb a:hover {
    text-decoration: underline;
}
.request-search-separator {
    color: #b9c4d0;
}
.request-search-current-bread {
    font-weight: 600;
    color: #1e293b;
}

/* Сетка категорий — чекбоксы */
.request-search-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
    transition: opacity 0.25s ease;
}

.request-search-category-card {
    background: white;
    border-radius: 20px;
    padding: 18px 22px;
    border: 1px solid #eef2f8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
}
.request-search-category-card:hover {
    transform: translateY(-3px);
    border-color: #dce5f0;
    box-shadow: 0 12px 22px -14px rgba(0, 0, 0, 0.1);
}
.request-search-category-card.selected {
    border-color: #4f46e5;
    background: #fafaff;
}

/* Чекбокс категории */
.request-search-custom-checkbox {
    width: 26px;
    height: 26px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.request-search-category-card.selected .request-search-custom-checkbox {
    background: #4f46e5;
    border-color: #4f46e5;
}
.request-search-custom-checkbox::after {
    content: "✓";
    font-size: 16px;
    font-weight: bold;
    color: white;
    display: none;
}
.request-search-category-card.selected .request-search-custom-checkbox::after {
    display: block;
}

.request-search-category-text h4 {
    font-size: 17px;
    font-weight: 600;
    color: #121f2f;
    margin: 0;
}

/* Панель подкатегорий */
.request-search-subcategories-panel {
    margin-top: 20px;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border-top: 1px solid #edf2f7;
    padding-top: 24px;
}

.request-search-subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}
.request-search-subcard {
    background: white;
    border-radius: 18px;
    padding: 15px 20px;
    border: 1px solid #eef2f8;
    font-weight: 500;
    font-size: 15px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}
/* Чекбокс для подкатегорий */
.request-search-sub-checkbox {
    width: 22px;
    height: 22px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}
.request-search-subcard.selected .request-search-sub-checkbox {
    background: #4f46e5;
    border-color: #4f46e5;
}
.request-search-subcard.selected .request-search-sub-checkbox::after {
    content: "✓";
    font-size: 14px;
    font-weight: bold;
    color: white;
    display: block;
}
.request-search-subcard:hover {
    border-color: #cddae9;
    background: #ffffff;
    transform: translateX(5px);
}
.request-search-subcard.selected {
    border-color: #4f46e5;
    background: #f5f3ff;
    color: #4f46e5;
    font-weight: 600;
}

/* Область действий */
.request-search-action-area {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid #edf2f7;
    padding-top: 20px;
}
.request-search-status-message {
    font-size: 14px;
    color: #2b6e3c;
    font-weight: 500;
    margin-right: auto;
}

/* ============================================
   БЛОК ФОРМЫ
   ============================================ */

.request-search-form-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    padding: 20px 0 0;
    position: relative;
}
.request-search-form-progress {
    border-right: 1px solid #e2e8f0;
    padding-right: 30px;
}
.request-search-progress-title {
    color: #a0aec0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
}
.request-search-progress-list {
    list-style: none;
}
.request-search-progress-item {
    color: #cbd5e0;
    font-size: 15px;
    margin-bottom: 18px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}
.request-search-progress-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
}
.request-search-progress-item.active {
    color: #2d3748;
    font-weight: 600;
}
.request-search-progress-item.active::before {
    background: #667eea;
    width: 10px;
    height: 10px;
}
.request-search-progress-item.completed {
    color: #718096;
}
.request-search-progress-item.completed::before {
    background: #667eea;
}
.request-search-form-content {
    max-width: 550px;
}
.request-search-form-h1 {
    color: #2d3748;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 600;
}
.request-search-form-subtitle {
    color: #718096;
    margin-bottom: 40px;
    font-size: 16px;
}
.request-search-form-group {
    margin-bottom: 35px;
    display: none;
}
.request-search-form-group.active {
    display: block;
    animation: requestSearchFadeIn 0.4s ease-in;
}
@keyframes requestSearchFadeIn {
    from { opacity: 0; transform: translateY(10px);}
    to { opacity: 1; transform: translateY(0);}
}
.request-search-form-label {
    display: block;
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 17px;
}
.request-search-form-input,
.request-search-form-textarea {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: white;
}
.request-search-form-input:focus,
.request-search-form-textarea:focus {
    outline: none;
    border-color: #667eea;
}
.request-search-form-textarea {
    min-height: 120px;
    resize: vertical;
}
.request-search-options {
    display: grid;
    gap: 12px;
}
.request-search-option {
    padding: 16px 20px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-size: 15px;
    color: #2d3748;
}
.request-search-option:hover {
    border-color: #667eea;
    background: #f7fafc;
}
.request-search-option.selected {
    border-color: #667eea;
    border-width: 2px;
    background: #f7fafc;
    color: #667eea;
    font-weight: 600;
}
.request-search-button-group {
    display: flex;
    gap: 12px;
    margin-top: 40px;
}
.request-search-btn-primary,
.request-search-btn-secondary {
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: none;
}
.request-search-btn-primary {
    background: #667eea;
    color: white;
}
.request-search-btn-primary:hover {
    background: #5568d3;
}
.request-search-btn-secondary {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}
.request-search-btn-secondary:hover {
    background: #e6edf5;
}
.request-search-optional {
    color: #a0aec0;
    font-weight: 400;
    font-size: 14px;
}
.request-search-success-message {
    display: none;
    text-align: center;
    padding: 80px 40px;
}
.request-search-success-message.active {
    display: block;
    animation: requestSearchFadeIn 0.5s ease-in;
}
.request-search-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #48bb78;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #48bb78;
}
.request-search-success-title {
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 600;
}
.request-search-success-text {
    color: #718096;
    font-size: 16px;
}

/* Toast сообщения */
.rs-toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.rs-toast-error {
    background: #e74c3c;
}
.rs-toast-success {
    background: #27ae60;
}

/* Подсветка ошибки валидации */
.rs-input-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
    animation: rsShake 0.4s ease;
}

.rs-form-group-error {
    animation: rsShake 0.4s ease;
}

@keyframes rsShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Мобильная версия */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 30px 25px;
        gap: 0;
    }

    .progress-section {
        display: none;
    }

    h1 {
        font-size: 26px;
    }

    .subtitle {
        margin-bottom: 30px;
    }

    .success-message {
        padding: 40px 20px;
    }

    /* Единый модуль — мобильная адаптация */
    .request-search-module {
        padding: 20px 16px;
    }
    .request-search-form-container {
        grid-template-columns: 1fr;
        padding: 20px 0 0;
        gap: 0;
    }
    .request-search-form-progress {
        display: none;
    }
    .request-search-categories-grid,
    .request-search-subcategories-grid {
        grid-template-columns: 1fr;
    }

    /* Toast — мобильная адаптация */
    .rs-toast-message {
        top: 10px;
        right: 10px;
        left: 10px;
        font-size: 13px;
        padding: 10px 16px;
    }
}

.near__body {
    margin-top: 20px;
}