/* Мобильная оптимизация для отзывов о кофейнях */

/* Общие мобильные стили */
@media (max-width: 768px) {
    /* Контейнер отзывов */
    .coffee-reviews-container {
        padding: 10px;
        margin: 0;
    }
    
    /* Заголовки секций */
    .coffee-shop-reviews-section h2,
    .reviews-list-header h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
        text-align: center;
    }
    
    /* Карточки отзывов */
    .review-item {
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Заголовок отзыва */
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .review-author {
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }
    
    .review-date {
        font-size: 12px;
        color: #888;
        margin-top: 4px;
    }
    
    /* Рейтинги в отзывах */
    .review-author-rating {
        font-size: 13px;
        padding: 4px 8px;
        background: rgba(0,0,0,0.05);
        border-radius: 4px;
        cursor: pointer;
    }
    
    .review-ratings {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 12px;
        margin: 12px 0;
    }
    
    .review-ratings.visible {
        display: block;
    }
    
    .review-rating-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        font-size: 13px;
        border-bottom: 1px solid #e9ecef;
    }
    
    .review-rating-item:last-child {
        border-bottom: none;
    }
    
    /* Содержимое отзыва */
    .review-content {
        font-size: 14px;
        line-height: 1.6;
        margin: 12px 0;
        color: #444;
    }
    
    /* Галерея фото в отзывах */
    .review-gallery {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 12px 0;
        justify-content: flex-start;
    }
    
    .review-gallery .gallery-item {
        width: 80px;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .review-gallery .gallery-item:hover {
        transform: scale(1.05);
    }
    
    .review-gallery .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Кнопки реакций */
    .reaction-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
    }
    
    .reaction-btn {
        padding: 8px 12px;
        font-size: 12px;
        border: 1px solid #ddd;
        border-radius: 20px;
        background: white;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .reaction-btn:hover {
        background: #f8f9fa;
        border-color: #bbb;
    }
    
    .reaction-btn.active {
        background: #007cba;
        color: white;
        border-color: #007cba;
    }
    
    .reaction-count {
        font-size: 11px;
        font-weight: 600;
    }
    
    /* Комментарии к отзывам */
    .review-comments {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #eee;
    }
    
    .review-comment {
        background: #f8f9fa;
        padding: 10px;
        border-radius: 6px;
        margin-bottom: 8px;
        font-size: 13px;
    }
    
    .comment-author {
        font-weight: 600;
        color: #333;
        margin-bottom: 4px;
    }
    
    .comment-date {
        font-size: 11px;
        color: #888;
    }
    
    .comment-content {
        margin-top: 6px;
        line-height: 1.4;
    }
    
    /* Форма комментария */
    .comment-form {
        margin-top: 10px;
    }
    
    .comment-form textarea {
        width: 100%;
        min-height: 80px;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        resize: vertical;
    }
    
    .add-comment-btn {
        margin-top: 8px;
        padding: 10px 15px;
        background: #007cba;
        color: white;
        border: none;
        border-radius: 4px;
        font-size: 14px;
        cursor: pointer;
    }
    
    .add-comment-btn:hover {
        background: #005a87;
    }
    
    /* Главное изображение кофейни - делаем горизонтальным */
    .wp-block-post-featured-image img,
    .wp-block-post-featured-image img.attachment-post-thumbnail,
    .wp-block-post-featured-image img.size-post-thumbnail,
    .coffee-shop-featured-image img,
    .coffee-shop-header img,
    .coffee-shop-single img.coffee-shop-image {
        height: 250px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 12px !important;
        margin-bottom: 15px !important;
    }
    
    /* Максимально увеличиваем контейнер лайтбокса */
    .cr-lightbox-container {
        max-width: 100% !important;
        max-height: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100vw !important;
        height: 100vh !important;
    }
    
    /* Максимально увеличиваем размер изображений с отступами и закругленными углами */
    .cr-lightbox-content img {
        max-height: calc(100vh - 30px) !important;
        max-width: calc(100vw - 30px) !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Стили для маленьких экранов */
@media (max-width: 576px) {
    /* Главное изображение кофейни для маленьких экранов */
    .wp-block-post-featured-image img,
    .wp-block-post-featured-image img.attachment-post-thumbnail,
    .wp-block-post-featured-image img.size-post-thumbnail,
    .coffee-shop-featured-image img,
    .coffee-shop-header img,
    .coffee-shop-single img.coffee-shop-image {
        height: 200px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 10px !important;
        margin-bottom: 12px !important;
    }
    
    .coffee-reviews-container {
        padding: 5px;
    }
    
    .review-item {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .review-author {
        font-size: 15px;
    }
    
    .review-content {
        font-size: 13px;
    }
    
    .review-gallery .gallery-item {
        width: 70px;
        height: 70px;
    }
    
    .reaction-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .review-comment {
        padding: 8px;
        font-size: 12px;
    }
    
    .comment-form textarea {
        min-height: 60px;
        font-size: 13px;
        padding: 8px;
    }
    
    .add-comment-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Стили для очень маленьких экранов */
@media (max-width: 480px) {
    .review-item {
        padding: 10px;
    }
    
    .review-gallery .gallery-item {
        width: 60px;
        height: 60px;
    }
    
    .reaction-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .reaction-count {
        font-size: 9px;
    }
}

/* Форма добавления отзыва на мобильных */
@media (max-width: 768px) {
    .add-review-form {
        padding: 15px;
        margin: 20px 0;
        border-radius: 10px;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
    }
    
    .add-review-form h3 {
        font-size: 18px;
        margin-bottom: 15px;
        text-align: center;
        color: #333;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 6px;
        color: #555;
    }
    
    /* Рейтинговые звезды */
    .rating-select {
        display: flex;
        justify-content: center;
        margin: 10px 0;
        gap: 4px;
    }
    
    .rating-select label {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 18px;
        text-align: center;
        cursor: pointer;
        color: #ddd;
        transition: color 0.2s ease;
    }
    
    .rating-select input:checked ~ label,
    .rating-select label:hover {
        color: #ffc107;
    }
    
    /* Детальные рейтинги */
    .detailed-ratings-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 15px 0;
    }
    
    .detailed-ratings-form select {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
    }
    
    /* Текстовое поле отзыва */
    #review_text {
        width: 100%;
        min-height: 120px;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        line-height: 1.5;
        resize: vertical;
    }
    
    /* Кнопка отправки */
    .submit-review-button {
        width: 100%;
        padding: 15px;
        background: #007cba;
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease;
    }
    
    .submit-review-button:hover {
        background: #005a87;
    }
    
    /* Загрузка фото */
    .photo-upload-container {
        margin: 15px 0;
    }
    
    .photo-upload-preview {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .photo-preview-item {
        width: 80px;
        height: 80px;
        position: relative;
        border-radius: 6px;
        overflow: hidden;
    }
    
    .photo-preview-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .remove-photo {
        position: absolute;
        top: 2px;
        right: 2px;
        width: 20px;
        height: 20px;
        background: rgba(255,0,0,0.8);
        color: white;
        border: none;
        border-radius: 50%;
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .photo-upload-button {
        width: 100%;
        padding: 12px;
        background: #f8f9fa;
        border: 2px dashed #ddd;
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .photo-upload-button:hover {
        background: #e9ecef;
        border-color: #bbb;
    }
}

@media (max-width: 576px) {
    .add-review-form {
        padding: 12px;
        margin: 15px 0;
    }
    
    .add-review-form h3 {
        font-size: 16px;
    }
    
    .rating-select label {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 16px;
    }
    
    #review_text {
        min-height: 100px;
        font-size: 13px;
    }
    
    .submit-review-button {
        padding: 12px;
        font-size: 15px;
    }
    
    .photo-preview-item {
        width: 70px;
        height: 70px;
    }
} 