/* ===== ОБЩИЕ СТИЛИ ===== */

.rep-filters {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.rep-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
}

.rep-filter-item {
    min-width: 200px;
    flex: 1 1 auto;
}

.rep-filter-item label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.rep-filter-item input,
.rep-filter-item select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.rep-filter-item input[type="text"],
.rep-filter-item input[type="number"] {
    height: 38px;
}

.rep-filter-item select {
    height: 38px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 8px center / 10px 10px;
    padding-right: 30px;
}

/* ===== АДАПТИВНЫЙ ДИЗАЙН ФИЛЬТРОВ ===== */

/* --- МОБИЛЬНЫЙ (до 767px) --- */
@media (max-width: 767px) {
    .rep-filter-row {
        flex-direction: column;
    }

    .rep-filter-item {
        min-width: 100%;
        max-width: 100%;
    }

    .rep-filter-search,
    .rep-filter-select,
    .rep-filter-plz,
    .rep-filter-typ {
        order: 1;
    }

    .rep-filter-price,
    .rep-filter-zimmer {
        order: 2;
    }

    .rep-filter-price:nth-child(odd),
    .rep-filter-zimmer:nth-child(odd) {
        order: 3;
    }

    .rep-filter-price:nth-child(even),
    .rep-filter-zimmer:nth-child(even) {
        order: 4;
    }
}

/* --- ПЛАНШЕТ (768px–1024px) --- */
@media (min-width: 768px) and (max-width: 1024px) {
    .rep-filter-row {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .rep-filter-item {
        flex: 1 1 calc(50% - 7.5px);
        min-width: 200px;
    }

    .rep-filter-search,
    .rep-filter-select,
    .rep-filter-plz,
    .rep-filter-typ {
        order: 1;
    }

    .rep-filter-price,
    .rep-filter-zimmer {
        order: 2;
    }
}

/* --- ДЕСКТОП (от 1025px) --- */
@media (min-width: 1025px) {
    .rep-filter-item {
        flex: 1 1 calc(25% - 11.25px);
        min-width: 200px;
    }

    .rep-filter-search,
    .rep-filter-select,
    .rep-filter-plz,
    .rep-filter-typ {
        order: 1;
    }

    .rep-filter-price,
    .rep-filter-zimmer {
        order: 2;
    }

    .rep-filter-price,
    .rep-filter-zimmer {
        flex: 1 1 calc(25% - 11.25px);
    }
}

/* ===== ТАБЛИЦА ===== */

.rep-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
}

.rep-table th,
.rep-table td {
    padding: 10px 5px;
    text-align: left;
    vertical-align: top;
    border: 1px solid #dee2e6;
}

.rep-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: relative;
    white-space: normal; /* ← разрешаем перенос всегда */
    word-break: break-word;
}

/* ===== ЗАГОЛОВКИ СТОЛБЦОВ — ГОРИЗОНТАЛЬНЫЕ НА ВСЕХ УСТРОЙСТВАХ ===== */

/* Убираем вертикальные заголовки полностью */
@media (min-width: 768px) {
    .rep-table th {
        /* Все стили для вертикального текста удалены */
        padding: 10px 5px;
        text-align: left;
        vertical-align: top;
        font-size: 14px;
        line-height: 1.5;
        white-space: normal;
        word-break: break-word;
        overflow: hidden;
        text-overflow: ellipsis;
        width: auto;
        min-width:60px;
    }

    .rep-table td:nth-child(2) img {
        max-width: 40px;
        height: auto;
        object-fit: cover;
    }
}

/* Мобильная версия — без изменений, оставляем как есть */
@media (max-width: 767px) {
    .rep-table th {
        font-size: 12px;
        padding: 8px 10px;
        white-space: normal;
        text-align: center;
        word-break: break-word;
    }

    .rep-table td {
        font-size: 12px;
        padding: 8px 10px;
        word-break: break-word;
    }

    .rep-table td:nth-child(2) img {
        max-width: 30px;
        height: auto;
    }
}

/* ===== КОНТРАСТНЫЕ ТАБЫ ===== */

.rep-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
    padding: 0;
}

.rep-tab {
    padding: 12px 20px;
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    top: 2px; /* небольшой вынос вперёд */
}

.rep-tab.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 -2px 5px rgba(0, 123, 255, 0.2);
    top: 0;
}

.rep-tab:hover:not(.active) {
    background-color: #f1f3f5;
    border-color: #adb5bd;
}

/* ===== ПАГИНАЦИЯ ===== */

.rep-pagination {
    margin-top: 20px;
    text-align: center;
}

.rep-pagination a,
.rep-pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #be923b;
    border-radius: 4px;
    color: #be923b;
    text-decoration: none;
    font-size: 14px;
}

.rep-pagination .current {
    background-color: #be923b;
    color: #fff;
    border-color:#be923b;
}

.rep-pagination a:hover {
    background-color: #be923b;
    color: #fff;
    border-color: #be923b;
}

/* ===== LOADER (Обновлено) ===== */

.rep-results-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    position: relative;
}

.rep-loader {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.rep-loader.show {
    display: flex;
}

.rep-loader-content {
    text-align: center;
    font-size: 16px;
    color: #495057;
}

.rep-loader-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-bottom: 10px;
    border: 3px solid #e9ecef;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 767px) {
    .rep-results-container {
        padding: 15px 10px;
        margin-top: 15px;
    }
}



/*========Partner Code==========*/

.partner-code .partner-code-value {
color: var(--global-palette2);
    font-size: 2em;
    font-weight: bold;
    padding: 10px 20px;
    background: var(--global-palette7);
    border-radius: 10px;
}

