/* css/waterbody-popups.css */
/* СТИЛИ ДЛЯ УЛУЧШЕННЫХ ПОПАПОВ ВОДОЕМОВ ПО ТЗ */

/* ===== ОСНОВНОЙ СТИЛЬ УЛУЧШЕННОГО ПОПАПА ===== */
.waterbody-preview-enhanced {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 350px;
}

/* Шапка с фото */
.preview-header-enhanced {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.waterbody-photo-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.waterbody-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.photo-icon {
    font-size: 48px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.photo-loading,
.no-photos {
    font-size: 12px;
    opacity: 0.9;
    text-align: center;
}

.waterbody-photo-loaded {
    width: 100%;
    height: 100%;
    position: relative;
}

.waterbody-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Наложение на фото */
.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
}

.waterbody-type-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.quick-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rating-badge {
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
}

.stars {
    font-size: 14px;
    color: #fbbf24;
}

.rating-value {
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
}

/* Тело попапа */
.preview-body-enhanced {
    padding: 16px;
}

.waterbody-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.location-info {
    margin-bottom: 16px;
}

.region {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Статистика */
.stats-preview {
    margin-bottom: 16px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stat-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    line-height: 1;
    margin-bottom: 2px;
}

.stat-value.loading {
    color: #9ca3af;
    background: #e5e7eb;
    border-radius: 4px;
    width: 30px;
    height: 16px;
    margin: 0 auto 2px auto;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    text-transform: lowercase;
}

/* Индикатор изученности */
.knowledge-indicator {
    margin-bottom: 16px;
}

.indicator-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: #4b5563;
}

.knowledge-percent {
    font-weight: 600;
    color: #374151;
}

.knowledge-percent.loading {
    color: #9ca3af;
    background: #e5e7eb;
    border-radius: 4px;
    width: 30px;
    height: 12px;
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Рыба и снасти */
.popular-fish-preview {
    margin-bottom: 12px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.fish-tags-container {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fish-tag {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-fish,
.no-data {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}

.loading-tags {
    font-size: 11px;
    color: #9ca3af;
}

.popular-gear-preview {
    margin-bottom: 16px;
}

.gear-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.gear-icon {
    font-size: 16px;
}

.gear-text {
    font-size: 12px;
    color: #4b5563;
    font-weight: 500;
    flex: 1;
}

.gear-text.loading {
    color: #9ca3af;
    background: #e5e7eb;
    border-radius: 4px;
    height: 12px;
    width: 120px;
}

/* Кнопки действий */
.preview-actions-enhanced {
    padding: 0 16px 16px 16px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.btn-like,
.btn-comment,
.btn-share {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

.btn-like:hover,
.btn-comment:hover,
.btn-share:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.like-icon,
.comment-icon,
.share-icon {
    font-size: 14px;
}

.like-count,
.comment-count {
    font-weight: 600;
    color: #374151;
}

.main-actions {
    display: flex;
    gap: 8px;
}

.btn-details,
.btn-add-report {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-details {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-add-report {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-add-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 480px) {
    .waterbody-preview-enhanced {
        max-width: 300px;
    }
    
    .preview-header-enhanced {
        height: 140px;
    }
    
    .preview-body-enhanced {
        padding: 12px;
    }
    
    .waterbody-title {
        font-size: 16px;
    }
    
    .stat-row {
        gap: 6px;
    }
    
    .stat-item {
        padding: 6px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .main-actions {
        flex-direction: column;
    }
    
    .btn-details,
    .btn-add-report {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.waterbody-preview-enhanced {
    animation: fadeIn 0.3s ease-out;
}

/* ===== СТИЛИ ДЛЯ СТРЕЛОЧКИ ПОПАПА ===== */
.enhanced-popup .maplibregl-popup-tip {
    border-top-color: #f8fafc !important;
}

/* ===== СОСТОЯНИЯ ЗАГРУЗКИ ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ===== СТИЛИ ДЛЯ НЕИЗУЧЕННЫХ ВОДОЕМОВ - ОБНОВЛЕННЫЙ ДИЗАЙН ===== */

.unknown-waterbody-popup .maplibregl-popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    padding: 0 !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    max-width: 320px !important;
}

.unknown-waterbody-preview {
    padding: 0;
}

/* Шапка для неизученного водоема */
.unknown-header .preview-photo {
    height: 140px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.unknown-waterbody-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.9) 0%, 
        rgba(118, 75, 162, 0.9) 50%,
        rgba(79, 172, 254, 0.9) 100%) !important;
    position: relative;
}

.mystery-icon {
    font-size: 48px;
    margin-bottom: 8px;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: float 3s ease-in-out infinite;
}

.mystery-text {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Анимация парящей иконки */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Бейдж */
.unknown-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
}

/* Основная информация */
.unknown-header + .preview-meta {
    padding: 12px 15px 8px 15px;
}

.unknown-title {
    color: #1a202c !important;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.unknown-header + .preview-meta .author-date {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: #718096;
    margin-bottom: 0;
}

.unknown-header + .preview-meta .author-date span {
    background: #f7fafc;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Контент */
.unknown-content {
    padding: 0 15px 12px 15px;
}

/* Статистика */
.unknown-stats {
    margin-bottom: 12px;
}

.unknown-stats .stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.unknown-stats .stat-item {
    text-align: center;
    padding: 8px 4px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.unknown-stats .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    display: block;
    line-height: 1;
    margin-bottom: 2px;
}

.unknown-stats .stat-label {
    font-size: 10px;
    color: #718096;
    font-weight: 500;
}

/* Сообщение с загадочностью */
.unknown-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border: 1px solid #bae6fd;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.unknown-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.mystery-icon-small {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.mystery-content {
    flex: 1;
}

.mystery-content strong {
    color: #0369a1;
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
}

.mystery-content p {
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
}

/* Индикатор первопроходца */
.pioneer-indicator {
    margin-bottom: 12px;
}

.pioneer-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: 20px;
    color: #92400e;
    position: relative;
    overflow: hidden;
}

.pioneer-badge::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1); opacity: 1; }
}

.pioneer-icon {
    font-size: 16px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.pioneer-text {
    font-size: 12px;
    font-weight: 600;
}

/* Кнопки */
.unknown-actions {
    padding: 0 15px 15px 15px;
}

.pioneer-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    position: relative;
    overflow: hidden;
}

.pioneer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.pioneer-btn:hover::before {
    left: 100%;
}

.pioneer-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

/* Адаптивность */
@media (max-width: 480px) {
    .unknown-stats .stat-row {
        gap: 6px;
    }
    
    .unknown-stats .stat-item {
        padding: 6px 2px;
    }
    
    .unknown-stats .stat-value {
        font-size: 14px;
    }
    
    .mystery-content p {
        font-size: 11px;
    }
    
    .pioneer-badge {
        padding: 8px 10px;
    }
    
    .pioneer-text {
        font-size: 11px;
    }
    
    .pioneer-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}

/* Плашка рейтинга в детальной панели - КРАСИВАЯ */
.waterbody-detailed-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.95) 100%);
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 600;
    margin-left: auto;
}

.waterbody-detailed-rating .rating-value {
    color: #1f2937;
    font-weight: 700;
    font-size: 16px;
}

.waterbody-detailed-rating .rating-stars {
    display: flex;
    gap: 1px;
}

.waterbody-detailed-rating .rating-count {
    color: #6b7280;
    font-size: 12px;
}

/* Виджет оценки - ПЕРЕМЕЩАЕМ В НИЗ И УЛУЧШАЕМ ДИЗАЙН */
.rating-widget {
    margin: 25px 0 15px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rating-widget h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #374151;
    font-weight: 600;
}

.rating-widget .rating-stars {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    gap: 4px;
}

.rating-widget .rating-star {
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 2px;
    color: #e5e7eb;
}

.rating-widget .rating-star:hover {
    transform: scale(1.2);
    color: #ffd700;
}

.rating-widget .rating-star.active {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.rating-widget .rating-star.active:hover {
    color: #fbbf24;
}

.rating-widget .rating-count {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
    font-weight: 500;
}

/* Анимация обновления рейтинга */
.rating-updated {
    animation: ratingPulse 0.6s ease;
}

@keyframes ratingPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Звезды рейтинга в плашках */
.rating-star {
    display: inline-block;
    transition: all 0.2s ease;
}

.rating-star.active {
    color: #fbbf24;
}

.rating-star.inactive {
    color: #e5e7eb;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .waterbody-preview-rating {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 90px;
    }
    
    .waterbody-detailed-rating {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .rating-widget {
        padding: 15px;
        margin: 20px 0 10px 0;
    }
    
    .rating-widget .rating-star {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .waterbody-preview-rating {
        flex-direction: column;
        gap: 2px;
        min-width: 70px;
        padding: 4px 8px;
    }
    
    .waterbody-detailed-rating {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 6px 10px;
    }
    
    .rating-widget .rating-star {
        font-size: 20px;
    }
}

/* ===== ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ РЕЙТИНГА ВОДОЕМОВ ===== */

/* КОМПАКТНАЯ плашка рейтинга в превью попапе - ЛЕВЫЙ НИЖНИЙ УГОЛ (ИСПРАВЛЕННАЯ) */
.waterbody-preview-rating {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.95) 100%);
    padding: 4px 6px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    min-width: 80px;
    max-width: 120px;
    justify-content: center;
    height: fit-content; /* ВАЖНО: чтобы не растягивалась на всю высоту */
    z-index: 10; /* ВАЖНО: чтобы была поверх фото */
}

.waterbody-preview-rating .rating-value {
    color: #1f2937;
    font-weight: 700;
    font-size: 13px;
    min-width: 20px;
    text-align: center;
}

.waterbody-preview-rating .rating-stars {
    display: flex;
    gap: 0;
    align-items: center;
}

.waterbody-preview-rating .rating-stars .rating-star {
    font-size: 10px;
    margin: 0 0px;
}

.waterbody-preview-rating .rating-count {
    color: #6b7280;
    font-size: 10px;
    min-width: 20px;
    text-align: center;
}

/* КОМПАКТНАЯ плашка рейтинга в детальной панели - В ОДНОМ РЯДУ С ТИПОМ ВОДОЕМА */
.waterbody-detailed-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.95) 100%);
    padding: 6px 12px;
    border-radius: 16px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 600;
    margin-left: auto;
    height: fit-content; /* ВАЖНО: для правильного выравнивания */
    flex-shrink: 0; /* ВАЖНО: чтобы не сжималась */
}

.waterbody-detailed-rating .rating-value {
    color: #1f2937;
    font-weight: 700;
    font-size: 14px;
}

.waterbody-detailed-rating .rating-stars {
    display: flex;
    gap: 0;
}

.waterbody-detailed-rating .rating-stars .rating-star {
    font-size: 12px;
    margin: 0 -1px;
}

.waterbody-detailed-rating .rating-count {
    color: #6b7280;
    font-size: 11px;
}

/* ИСПРАВЛЯЕМ КОНТЕЙНЕР МЕТА-ИНФОРМАЦИИ В ДЕТАЛЬНОЙ ПАНЕЛИ */
.waterbody-meta-tz {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.waterbody-meta-tz .meta-item-tz {
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #475569;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* ИСПРАВЛЯЕМ КОНТЕЙНЕР ШАПКИ В ДЕТАЛЬНОЙ ПАНЕЛИ */
.waterbody-header-tz {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.panel-main-info-tz .waterbody-header-tz {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* КОМПАКТНЫЙ виджет оценки */
.rating-widget {
    margin: 20px 0 15px 0;
    padding: 5px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rating-widget h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #374151;
    font-weight: 600;
}

.rating-widget .rating-stars {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    gap: 2px;
}

.rating-widget .rating-star {
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 1px;
    color: #e5e7eb;
}

.rating-widget .rating-star:hover {
    transform: scale(1.15);
    color: #ffd700;
}

.rating-widget .rating-star.active {
    color: #ffd700;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.3);
}

.rating-widget .rating-count {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 500;
}

/* Анимация обновления рейтинга - компактная */
.rating-updated {
    animation: ratingPulseCompact 0.4s ease;
}

@keyframes ratingPulseCompact {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
    }
    50% { 
        transform: scale(1.03);
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Адаптивность для мобильных - компактная */
@media (max-width: 768px) {
    .waterbody-preview-rating {
        font-size: 11px;
        padding: 5px 8px;
        min-width: 70px;
        max-width: 100px;
        bottom: 8px;
        left: 8px;
    }
    
    .waterbody-detailed-rating {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .waterbody-meta-tz {
        gap: 8px;
    }
    
    .waterbody-meta-tz .meta-item-tz {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .rating-widget {
        padding: 14px;
        margin: 15px 0 10px 0;
    }
    
    .rating-widget .rating-star {
        font-size: 20px;
    }
    
    .waterbody-preview-rating .rating-stars .rating-star,
    .waterbody-detailed-rating .rating-stars .rating-star {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .waterbody-preview-rating {
        flex-direction: row;
        gap: 3px;
        min-width: 65px;
        max-width: 90px;
        padding: 4px 6px;
        bottom: 6px;
        left: 6px;
    }
    
    .waterbody-preview-rating .rating-value {
        font-size: 12px;
    }
    
    .waterbody-detailed-rating {
        flex-direction: row;
        gap: 4px;
        padding: 5px 8px;
    }
    
    .waterbody-meta-tz {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .waterbody-detailed-rating {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .rating-widget .rating-star {
        font-size: 18px;
    }
    
    .waterbody-preview-rating .rating-stars .rating-star,
    .waterbody-detailed-rating .rating-stars .rating-star {
        font-size: 8px;
    }
}

/* Для десктопной версии - делаем мета-инфо в одну строку */
@media (min-width: 769px) {
    .waterbody-meta-tz {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
    }
    
    .waterbody-detailed-rating {
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .waterbody-meta-tz {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .waterbody-detailed-rating {
        margin-left: 0;
        align-self: stretch;
        justify-content: center;
    }
}

/* ===== ПРОСТОЕ РЕШЕНИЕ - БЛОК ОЦЕНКИ И КНОПКА В ОДНОЙ СТРОКЕ ===== */

/* Контейнер для двух колонок */
.rating-actions-row {
    display: flex;
    gap: 8px;
    margin: 0 0 0 0;
    padding: 15px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    flex-wrap: wrap;
    justify-content: center;
}

/* Левая колонка - оценка (сохраняем старые стили) */
.rating-widget {
    flex: 1;
    margin: 0;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Правая колонка - кнопка добавления отчета */
.add-report-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: auto;
}

.add-report-side:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.add-report-side .add-report-icon {
    font-size: 20px;
    margin-bottom: 6px;
    display: block;
}

.add-report-side .add-report-text {
    font-size: 13px;
    line-height: 1.3;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .rating-actions-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .rating-widget {
        padding: 14px;
    }
    
    .add-report-side {
        padding: 14px;
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .rating-actions-row {
        margin: 15px 0 10px 0;
        gap: 10px;
    }
    
    .rating-widget {
        padding: 12px;
    }
    
    .add-report-side {
        padding: 12px;
    }
    
    .add-report-side .add-report-icon {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .add-report-side .add-report-text {
        font-size: 12px;
    }
}

/* ===== ПРОВЕРКА ЧТО СТАРЫЕ СТИЛИ rating-widget СОХРАНЯЮТСЯ ===== */

/* Если rating-widget был скрыт - восстанавливаем */
.rating-widget {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Убедимся что все анимации работают */
.rating-widget .rating-star {
    font-size: 24px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin: 0 2px !important;
    color: #e5e7eb !important;
}

.rating-widget .rating-star:hover {
    transform: scale(1.2) !important;
    color: #ffd700 !important;
}

.rating-widget .rating-star.active {
    color: #ffd700 !important;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4) !important;
}

.rating-widget .rating-star.active:hover {
    color: #fbbf24 !important;
}

.rating-widget h4 {
    margin: 0 0 15px 0 !important;
    font-size: 16px !important;
    color: #374151 !important;
    font-weight: 600 !important;
}

.rating-widget .rating-count {
    font-size: 14px !important;
    color: #6b7280 !important;
    margin-top: 8px !important;
    font-weight: 500 !important;
}

/* Стили для стандартных попапов пользовательских водоемов */
.waterbody-preview-tz.user-created .header-overlay-tz .waterbody-badge-tz {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(29, 78, 216, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.waterbody-preview-tz.user-created .photo-placeholder.waterbody-photo-placeholder-tz {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.waterbody-preview-tz.user-created .location-info-tz .region-tz::after {
    content: ' 👤';
    font-size: 12px;
}

/* Адаптация детальной панели для пользовательских водоемов */
.user-object-details .waterbody-header-tz {
    position: relative;
}

.user-object-details .user-object-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.user-object-details .user-object-status {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.user-object-details .user-object-status.approved {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.user-object-details .user-object-status.pending {
    background: rgba(251, 191, 36, 0.9);
    color: #92400e;
}

/* Информация о пользовательском объекте в детальной панели */
.user-object-info-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #bae6fd;
}

.user-object-info-section .info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-object-info-section .user-icon {
    font-size: 20px;
    background: #3b82f6;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-object-info-section .info-title {
    font-weight: 600;
    color: #1e40af;
    margin: 0;
}

.user-object-info-section .info-text {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПРЕВЬЮ ПОПАПОВ НА МОБИЛЬНЫХ ===== */

@media (max-width: 768px) {
    .waterbody-preview-enhanced {
        max-width: 300px !important;
    }
    
    .preview-header-enhanced {
        height: 120px;
    }
    
    .preview-body-enhanced {
        padding: 12px;
    }
    
    .waterbody-title {
        font-size: 16px;
    }
    
    .stat-row {
        gap: 6px;
    }
    
    .stat-item {
        padding: 6px 4px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .fish-tag {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .btn-like,
    .btn-comment,
    .btn-share {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .main-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-details,
    .btn-add-report {
        width: 100%;
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .waterbody-preview-enhanced {
        max-width: 280px !important;
    }
    
    .preview-header-enhanced {
        height: 100px;
    }
    
    .waterbody-title {
        font-size: 14px;
    }
    
    .stat-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item:nth-child(3) {
        grid-column: 1 / -1;
        margin-top: 4px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .fish-tags-container {
        max-height: 60px;
        overflow-y: auto;
    }
}

/* Для превью простого попапа */
@media (max-width: 768px) {
    .waterbody-preview-tz .preview-header-tz {
        height: 120px;
    }
    
    .waterbody-title-tz {
        font-size: 16px;
    }
    
    .stats-grid-tz {
        gap: 6px;
    }
    
    .stat-item-tz {
        padding: 6px;
    }
    
    .stat-value-tz {
        font-size: 14px;
    }
    
    .fish-tags-tz .fish-tag-tz {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .main-actions-tz {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-details-main-tz,
    .btn-add-report-tz {
        width: 100%;
        padding: 8px;
        font-size: 12px;
    }
}