/* ============================================
   СТИЛИ ДЛЯ ФОТО В КАРТОЧКАХ ОТЗЫВОВ
   УНИВЕРСАЛЬНЫЕ - РАБОТАЮТ И В ПРОФИЛЕ, И В ПОПАПЕ
   ============================================ */

/* ===== КОНТЕЙНЕР ФОТО В КАРТОЧКЕ ===== */
.review-photo-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    color: #94a3b8;
    border: 2px dashed #cbd5e1;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.review-photo-placeholder .photo-icon {
    font-size: 32px;
    opacity: 0.6;
}

.review-photo-placeholder .photo-text {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
}

/* ===== С РЕАЛЬНЫМИ ФОТО ===== */
.review-photo-placeholder.has-photo {
    border: none;
    background: #1e293b;
    padding: 0;
    cursor: pointer;
}

.review-photo-placeholder.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.review-photo-placeholder.has-photo .photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 11px;
}

.review-photo-placeholder.has-photo .photo-overlay .photo-count {
    background: rgba(0,0,0,0.5);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 10px;
}

.review-photo-placeholder.has-photo .photo-overlay .view-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.review-photo-placeholder.has-photo .photo-overlay .view-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== МИНИАТЮРЫ (если несколько фото) ===== */
.review-photo-placeholder .photo-thumbnails {
    display: flex;
    gap: 4px;
    position: absolute;
    bottom: 8px;
    right: 8px;
}

.review-photo-placeholder .photo-thumbnails .thumb {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.review-photo-placeholder .photo-thumbnails .thumb-more {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    border: 2px solid white;
}

/* ===== МОДАЛЬНОЕ ОКНО ГАЛЕРЕИ ===== */
#photo-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

#photo-gallery-modal .gallery-main-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

#photo-gallery-modal .gallery-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.2s;
}

#photo-gallery-modal .gallery-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

#photo-gallery-modal .gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 16px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 5;
}

#photo-gallery-modal .gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

#photo-gallery-modal .gallery-nav-btn.prev {
    left: 10px;
}

#photo-gallery-modal .gallery-nav-btn.next {
    right: 10px;
}

#photo-gallery-modal .gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 600px;
    padding: 0 10px;
}

#photo-gallery-modal .gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}

#photo-gallery-modal .gallery-thumb.active {
    border-color: #3b82f6;
    opacity: 1;
}

#photo-gallery-modal .gallery-thumb:hover {
    opacity: 1;
}

#photo-gallery-modal .gallery-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 12px;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Планшеты и мобильные */
@media (max-width: 768px) {
    .review-photo-placeholder {
        height: 100px;
    }
    
    .review-photo-placeholder .photo-icon {
        font-size: 24px;
    }
    
    .review-photo-placeholder .photo-text {
        font-size: 10px;
    }
    
    #photo-gallery-modal .gallery-nav-btn {
        padding: 12px 8px;
        font-size: 20px;
    }
    
    #photo-gallery-modal .gallery-nav-btn.prev {
        left: 5px;
    }
    
    #photo-gallery-modal .gallery-nav-btn.next {
        right: 5px;
    }
    
    #photo-gallery-modal .gallery-thumb {
        width: 40px;
        height: 40px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .review-photo-placeholder {
        height: 80px;
    }
    
    .review-photo-placeholder .photo-icon {
        font-size: 20px;
    }
    
    .review-photo-placeholder .photo-text {
        font-size: 9px;
    }
    
    #photo-gallery-modal {
        padding: 10px;
    }
    
    #photo-gallery-modal .gallery-nav-btn {
        padding: 8px 6px;
        font-size: 16px;
    }
}

/* ===== ТЁМНАЯ ТЕМА ===== */
@media (prefers-color-scheme: dark) {
    .review-photo-placeholder {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
        color: #64748b;
    }
    
    .review-photo-placeholder .photo-icon {
        color: #64748b;
    }
    
    .review-photo-placeholder .photo-text {
        color: #64748b;
    }
    
    .review-photo-placeholder.has-photo {
        background: #0f172a;
    }
}