/* Search Page Styles */

/* Дополнительные стили для страницы поиска */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Карточки недвижимости - всегда светлые, без hover эффектов */
.property-card {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: none !important;
    /* Убираем transitions */
    transform: translateY(0) !important;
}

/* Полностью убираем hover эффекты с высоким приоритетом */
.property-card:hover {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(0) !important;
    border-color: #e5e7eb !important;
}

/* Убираем hover эффекты для изображений внутри карточек */
.property-card:hover .property-image,
.property-card:hover img {
    transform: scale(1) !important;
}

/* Переопределяем все возможные состояния */
.property-card:hover,
.property-card:active,
.property-card:focus {
    background: white !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transform: none !important;
    transition: none !important;
}

/* Убираем hover для всех внутренних элементов */
.property-card * {
    transition: none !important;
}

.property-card:hover * {
    transform: none !important;
}

/* Стили для цены в карточке */
.property-card .price-section {
    min-width: 120px;
    text-align: right;
}

.property-card .price-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.property-card .price-period {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}

/* Стили для информации о гостях */
.property-card .guests-info {
    display: flex;
    align-items: center;
    color: #059669;
    font-weight: 500;
}

.property-card .guests-info i {
    color: #10b981;
    margin-right: 4px;
}

/* Улучшенные стили для деталей объекта */
.property-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    font-size: 0.875rem;
}

.property-details .detail-item {
    display: flex;
    align-items: center;
    color: #374151;
    font-weight: 500;
}

.property-details .detail-item i {
    color: #6b7280;
    margin-right: 6px;
    width: 14px;
    text-align: center;
}

/* Стили для заголовков */
.property-card h3 {
    color: #111827 !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.property-card h3 a:hover {
    color: #2563eb !important;
}

/* Стили для адреса */
.property-card .location {
    color: #374151 !important;
    font-weight: 500 !important;
}

.property-card .location .city {
    font-weight: 600;
}

.property-card .location .district {
    color: #6b7280;
}

/* Стили для описания */
.property-card .description {
    color: #374151 !important;
    line-height: 1.5 !important;
}

/* Фильтр по гостям */
#guests-filter {
    transition: all 0.3s ease;
}

#guests-filter.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#guests-filter:not(.hidden) {
    opacity: 1;
    max-height: 200px;
    margin-bottom: 1.5rem;
}

/* Мобильные карточки - компактные прямоугольники */
@media (max-width: 768px) {
    .property-card {
        border-radius: 12px !important;
        margin-bottom: 12px;
    }

    .property-card .flex.flex-col.md\\:flex-row {
        flex-direction: row !important;
        align-items: stretch;
    }

    .property-card .md\\:w-80 {
        width: 120px !important;
        height: 80px !important;
        flex-shrink: 0;
    }

    .property-card .h-64.md\\:h-48 {
        height: 80px !important;
    }

    .property-card .flex-1.p-6 {
        padding: 12px 16px !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    /* Компактная информация на мобильных */
    .property-card h3 {
        font-size: 14px !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
    }

    .property-card .grid.grid-cols-2.sm\\:grid-cols-4 {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        font-size: 12px !important;
    }

    .property-card .text-gray-600.mb-4 {
        font-size: 12px !important;
        margin-bottom: 8px !important;
    }
}

/* Стили для фильтров */
.filters-sidebar {
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.filters-sidebar::-webkit-scrollbar {
    width: 4px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 2px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Стили для чекбоксов количества комнат */
input[type="checkbox"]:checked+span {
    color: #2563eb;
    font-weight: 600;
}

/* Кастомные стили для переключателей */
.view-toggle button.active {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

/* Анимация загрузки */
@keyframes pulse-search {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.search-loading {
    animation: pulse-search 1.5s ease-in-out infinite;
}

/* Стили для карты */
#property-map {
    position: relative;
    z-index: 1;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 0;
}

.map-popup {
    padding: 16px;
    max-width: 280px;
}

.map-popup-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.map-popup-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.3;
}

.map-popup-price {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 8px;
}

.map-popup-location {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.map-popup-location i {
    margin-right: 4px;
}

.map-popup-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.map-popup-button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.map-popup-button:hover {
    background-color: #1d4ed8;
}

/* Современные красивые маркеры для карты */
.property-marker {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: 3px solid white;
    border-radius: 20px;
    width: 40px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-marker::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #1d4ed8;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.property-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.property-marker.selected {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: scale(1.2);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
}

.property-marker.selected::after {
    border-top-color: #b91c1c;
}

/* Красивые кастомные маркеры-булавки */
.custom-pin-marker {
    position: relative;
    display: inline-block;
}

.pin-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: relative;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

.pin-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pin-icon::after {
    content: '₽';
    position: absolute;
    top: 7px;
    left: 10px;
    font-size: 10px;
    font-weight: bold;
    color: #1d4ed8;
    transform: rotate(45deg);
}

.custom-pin-marker:hover .pin-icon {
    transform: rotate(-45deg) scale(1.1);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.6);
}

/* Стили для мобильных устройств */
.filters-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 50;
    transition: left 0.3s ease;
}

.filters-sidebar.open {
    left: 0;
}

.filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    display: none;
}

.filters-overlay.show {
    display: block;
}

/* Анимации появления элементов */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-card:nth-child(1) {
    animation-delay: 0.1s;
}

.property-card:nth-child(2) {
    animation-delay: 0.2s;
}

.property-card:nth-child(3) {
    animation-delay: 0.3s;
}

.property-card:nth-child(4) {
    animation-delay: 0.4s;
}

.property-card:nth-child(5) {
    animation-delay: 0.5s;
}

/* Стили для избранного */
.favorite-btn.favorited {
    color: #dc2626;
}

.favorite-btn.favorited i {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Стили для состояний загрузки */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Улучшенные стили для пагинации */
.pagination a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Стили для тултипов */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
    margin-bottom: 4px;
}

/* Стили для фокуса на элементах */
.focus-ring:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-offset: 2px;
}

/* Стили для индикаторов статуса */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.available {
    background-color: #10b981;
}

.status-indicator.reserved {
    background-color: #f59e0b;
}

.status-indicator.unavailable {
    background-color: #ef4444;
}

/* Стили для адаптивного дизайна */
@media (max-width: 640px) {
    .property-card .grid.grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .filters-form .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .search-header .flex.flex-col {
        align-items: flex-start;
    }
}

/* Стили для темной темы (если потребуется) */
@media (prefers-color-scheme: dark) {
    .property-card {
        background-color: #1f2937;
        border-color: #374151;
    }

    .property-card h3 {
        color: #f9fafb;
    }

    .property-card p,
    .property-card span {
        color: #d1d5db;
    }
}