/* Выравнивание характеристик точками */
.property-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.property-name {
    flex: 0 0 auto;
    white-space: nowrap;
    padding-right: 0.25rem;
}

.property-dots {
    flex: 1 0 auto;
    border-bottom: 1px dotted #d1d5db;
    margin: 0 0.5rem;
    min-width: 20px;
    height: 1em;
    flex-shrink: 0;
    margin-top: 0.25em;
}

.property-value {
    flex: 0 1 auto;
    min-width: 0;
    text-align: right;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    padding-left: 0.25rem;
}

/* На мобильных устройствах - вертикальное расположение */
@media (max-width: 768px) {
    .property-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .property-name {
        font-weight: 700;
    }
    
    .property-dots {
        display: none;
    }
    
    .property-value {
        text-align: left;
    }
}

/* Исправление цвета текста при наведении на допы */
.extra-badge:hover {
    background-color: #ea580c !important;
    color: #ffffff !important;
}

#media-modal {
    margin-top: 0;
}

/* Скрытие лишних миниатюр на мобильных устройствах */
@media (max-width: 768px) {
    #media-thumbnails-grid .thumbnail-image:nth-of-type(n+7) {
        display: none;
    }
    
    #media-thumbnails-grid.has-video .thumbnail-image:nth-of-type(n+6) {
        display: none;
    }
}

/* Карта */
#map {
    z-index: 0;
    border-radius: 0;
}
.custom-marker {
    background: transparent;
    border: none;
}
.leaflet-container {
    font-family: inherit;
}
.leaflet-container .leaflet-control-attribution {
    display: none;
}
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.leaflet-popup-content {
    margin: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}

#location-address {
    transition: all 0.3s ease-out;
}
#location-address:hover {
    background-color: #f9fafb;
}

/* Фоновые изображения с блюром */
.image-media-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    opacity: 0.6;
    z-index: 0;
}

.image-media-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.thumbnail-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    opacity: 0.5;
    z-index: 0;
}

#media-thumbnails-grid > div {
    max-height: 60px;
}

@media (min-width: 768px) {
    #media-thumbnails-grid > div {
        max-height: 75px;
    }
}

.break-words {
    word-break: break-word;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.overflow-wrap-anywhere {
    overflow-wrap: anywhere;
}

.trix-content {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.trix-content * {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Админские кнопки */
.admin-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
    position: relative;
}

.admin-float-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-float-btn-text {
    white-space: nowrap;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-left: 0;
}

#adminFloatingButtons:hover .admin-float-btn {
    width: auto;
    padding-left: 0.75rem;
    padding-right: 1rem;
    gap: 0.5rem;
}

#adminFloatingButtons:hover .admin-float-btn-text {
    opacity: 1;
    width: auto;
}

@media (max-width: 640px) {
    #adminFloatingButtons {
        bottom: 5rem;
    }
    .admin-float-btn-text {
        display: none;
    }
    #adminFloatingButtons:hover .admin-float-btn {
        width: 44px;
        padding-left: 0;
        padding-right: 0;
        gap: 0;
    }
}

