/*
* file rent.css
*/


/*
*********************************** rent START
*/

.rent_list {
    display: block;
    padding: 40px 20px;
    margin-bottom: 40px;
}

.rent_list .heading h2 {
    margin-top: 0;
    margin-left: 10px;
    margin: 0 0 20px 10px;
}

.rent-wrapper {
    margin: 40px auto;
}

.rent_block h2 {
    margin: 0;
    font-size: 20px;
    line-height: 24px;
    font-weight: 600;
    font-family: 'Nunito';
}

.rent_block a {
    color: #32353d;

}

.rent-wrapper {
    margin: 40px auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
}

#rentContainer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    align-content: start;
    gap: 40px;
    order: 1;
}

/*
*********************************** rent_card START
*/
.rent_card {
    width: 100%;
    display: flex;
    padding: 14px;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 18px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.rent_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.rent_thumbnail {
    width: 35%;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
}

.rent_container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rent_adress {
    font-size: 16px;
    line-height: 19px;
    color: #7F7F7F;
    font-weight: 400;
}

.rent_card h2 {
    margin: 0;
    font-size: 20px;
    line-height: 24px;
    font-weight: 600;
    font-family: 'Nunito';
}

.rent_card a {
    color: #32353d;

}

.rent_card a:hover {
    color: #2672ec;
}

.rent-schedule {
    width: 280px;
}


/*
*********************************** filtration START
*/


.filtration__unit {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.block_search {
    position: relative;
    display: flex;
    align-items: center;
}

.post_icon {
    position: absolute;
    right: 14px;
    pointer-events: none;
}

.post_icon path {
    fill: var(--btncolor);
}

.block_search {
    width: 50%;
}

.rent-wrap-filters {
    display: flex;
    width: 40%;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.rent-filters {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 16px;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.filter-label .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #666;
}

.filter-select {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: #2672ec;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.filter-select:hover {
    border-color: #2672ec;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-submit {
    background: #2672ec;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.filter-submit:hover {
    background: #2672ec;
    transform: translateY(-2px);
}

.filter-reset {
    background: #f0f0f0;
    color: #666;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.filter-reset:hover {
    background: #e0e0e0;
    color: #333;
}

/* Индикатор загрузки */
#rentContainer.loading {
    position: relative;
    min-height: 200px;
    opacity: 0.7;
}

#rentContainer.loading:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сообщение о пустом результате */
.no-posts-found {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filtration__unit {
        flex-direction: column;
        align-items: stretch;
    }
    
    .block_search,
    .rent-filters {
        min-width: 100%;
    }
    
    .rent-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select,
    .filter-button,
    .reset-button {
        width: 100%;
    }
}

/* Активные фильтры */
.active-filters {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.active-filter {
    background: #e3f2fd;
    color: #1565c0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #bbdefb;
}

.remove-filter {
    background: none;
    border: none;
    color: #1565c0;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.remove-filter:hover {
    background: #1565c0;
    color: white;
}


/*
* Сайдбар
*/
.rent-wrapper aside#secondary {
    order: 0;
}

.right-sidebar-wrapper.widget-rent .textwidget.custom-html-widget {
    padding: 0;
}

/* карточка фильтра */
.filter-card {
    width: 100%;
    padding: 28px 16px;
    transition: all 0.2s;
}

.filter-card-title {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e9edf4;
    margin: 0 0 16px;
    padding: 0 0 16px;
    align-items: center;
}

.filter-card h4 {
    display: block;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mainbackground);
}

.filter-icon {
    display: block;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%2332353d'%3e%3cpath d='M200-160v-280h-80v-80h240v80h-80v280h-80Zm0-440v-200h80v200h-80Zm160 0v-80h80v-120h80v120h80v80H360Zm80 440v-360h80v360h-80Zm240 0v-120h-80v-80h240v80h-80v120h-80Zm0-280v-360h80v360h-80Z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 100%;
}

/* Попап событий  для расписания */
.event-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-popup.active {
    display: flex;
    opacity: 1;
}

.popup-content {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: popup-appear 0.3s ease;
    border: 1px solid #e9f0fa;
}

@keyframes popup-appear {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #7f8fa4;
    transition: color 0.2s;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    color: #1e3a6b;
    background: #f0f5ff;
}

.popup-body {
    padding: 30px 28px;
    text-align: center;
}

.popup-day {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e3a6b;
    line-height: 1.2;
    margin-bottom: 8px;
}

.popup-date {
    font-size: 1.2rem;
    color: #4f6f9f;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #dae5f2;
}

.popup-desc {
    font-size: 1.1rem;
    color: #23457a;
    background: #f2f9ff;
    padding: 18px;
    border-radius: 20px;
    margin-bottom: 28px;
    border: 1px solid #cbdefa;
}

.popup-book-btn {
    background: linear-gradient(135deg, #2b6ed7, #1e4f9e);
    color: white;
    border: none;
    padding: 16px 36px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    box-shadow: 0 10px 20px -8px #1e4f9e80;
    border: 1px solid #4682e0;
}

.popup-book-btn:hover {
    background: linear-gradient(135deg, #1e5bc0, #153d7a);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -8px #143a73;
}

.popup-book-btn:active {
    transform: translateY(1px);
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
    .popup-body {
        padding: 25px 18px;
    }
    .popup-day {
        font-size: 1.8rem;
    }
    .popup-date {
        font-size: 1rem;
    }
    .popup-desc {
        font-size: 1rem;
        padding: 14px;
    }
}

/*
 * single rent
*/

.content-wrapper article {
    margin: 40px auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
}

.single-rent .post-thumbnail {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    background-color: #f5f5f5;
}

.single-rent .wp-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.post__meta {
    margin-top: 20px;
}

.single-rent .rent_tag_block {
    padding: 0 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    font-weight: bold;
}

.address h3 {
    margin-bottom: 0;
}

.address_block {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rent-address {
    display: inline-block;
}

.right-content-wrapper {
    min-height: 100%;
}

.sticky {
    top: 160px;
}


.right-content-wrapper .rent_price {
    font-size: 26px;
}

.contact {
    margin: 20px 0;
    padding: 10px;
    height: 48px;
    background-color: rgba(0, 0, 0, .12);
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

.right-content-wrapper button.button {
    width: 100%;
    margin: 20px 0;
}

.contact-chat-block h3 {
    font-size: 18px;
}

textarea.contact-chat{
    resize: none;
    min-height: 66px;
    max-height: 66px;
    height: 66px;
    overflow-y: auto;
}

/*
 * Яндекс карты
*/
.rent-map-block {
    margin: 0;
    text-align: right;
}
.show-map-btn {
    width: 205px;
}
.map-container {
    display: none;
    width: 100%;
    height: 400px;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

/* Убеждаемся, что карта занимает весь контейнер */
.map-container > ymaps,
.map-container > [class*="ymaps"] {
    width: 100% !important;
    height: 100% !important;
}

/* Для отладки - временно показываем границы */
.map-container {
    border: 1px solid #ddd;
    background: #f9f9f9;
}

/* Убираем ограничение ширины для подписи */
[class*="ymaps"][class*="islets_icon-caption"] {
    max-width: none !important;
    white-space: nowrap !important;
}


.rent-about-block {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.rent-about-block h3 {
    margin: 20px 0 10px;
    font-size: 18px;
    color: #333;
}

.rent-about-block h3:first-child {
    margin-top: 0;
}

.rent-contacts,
.rent-characteristics,
.rent-conditions {
    margin-bottom: 25px;
}

.rent-props-list,
.rent-conditions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rent-props-list li,
.rent-conditions-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.rent-props-list li:last-child,
.rent-conditions-list li:last-child {
    border-bottom: none;
}

.rent-contact-item {
    margin-bottom: 10px;
}

.rent-contact-item span {
    display: inline-block;
    width: 80px;
    font-weight: bold;
}

.rent-contact-item a {
    color: #0073aa;
    text-decoration: none;
}

.rent-contact-item a:hover {
    text-decoration: underline;
}

/* Сетка для компактного вывода */
.rent-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.property-item {
    display: flex;
    padding: 0 10px;
    align-items: center;
    justify-content: space-between;
}

.property-label {
    display: block;
    word-wrap: break-word;
    color: #54575e;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

.property-value {
    display: block;
    color: #32353d;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    order: 2;
}

.property-item::after {
    content: '';
    display: block;
    order: 1;
    flex: 1;
    height: 1px;
    margin: 15px 10px;
    background: repeating-linear-gradient(90deg, #ccc, #ccc 5px, transparent 5px, transparent 10px);
}

@media (max-width: 768px) {
    .rent-properties-grid {
        grid-template-columns: 1fr;
    }
}