/* Стили для системы отзывов */

/* Модальное окно отзывов */
.review-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

.review-modal.show {
    opacity: 1;
}

.review-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.review-modal.show .review-modal-content {
    transform: scale(1) translateY(0);
}

.review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 2rem;
}

.review-modal-header h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin: 0;
}

.review-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.review-modal-close:hover {
    background: var(--light-gray);
    color: var(--primary-dark);
}

/* Форма отзыва */
.review-form {
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-rating-section {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.1));
    border-radius: 15px;
    border: 2px solid var(--gold);
}

.review-rating-section label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.star {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.star:hover,
.star.active {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    transform: scale(1.1);
}

/* Информация о госте */
.review-guest-info {
    padding: 1.5rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 15px;
    border: 1px solid var(--gold);
}

.review-guest-info h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.review-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.review-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-form-group label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 14px;
}

.review-form-group input,
.review-form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.review-form-group input:focus,
.review-form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.char-count {
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* Категории рейтинга */
.review-categories {
    padding: 1.5rem;
    background: rgba(245, 245, 245, 0.5);
    border-radius: 15px;
    border: 1px solid var(--light-gray);
}

.review-categories h4 {
    margin: 0 0 1.5rem 0;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.category-ratings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-rating label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 14px;
    min-width: 150px;
}

.category-stars {
    display: flex;
    gap: 0.25rem;
}

.category-stars .star {
    font-size: 1.5rem;
}

/* Действия */
.review-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.review-btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
    flex: 1;
}

.review-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.review-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.review-btn-secondary {
    background: transparent;
    color: var(--text-gray);
    border: 2px solid var(--light-gray);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
}

.review-btn-secondary:hover {
    background: var(--light-gray);
    color: var(--primary-dark);
}

/* Отображение отзывов */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.reviews-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviews-title h2 {
    margin: 0;
    color: var(--primary-dark);
}

.reviews-count {
    color: var(--text-gray);
    font-size: 1rem;
}

.leave-review-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.leave-review-btn:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Фильтры отзывов */
.reviews-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.review-filter-btn {
    background: transparent;
    border: 2px solid var(--light-gray);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
}

.review-filter-btn.active,
.review-filter-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
}

/* Статистика отзывов */
.review-stats-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.1));
    border-radius: 15px;
    border: 2px solid var(--gold);
}

.average-rating {
    text-align: center;
}

.rating-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--gold);
    display: block;
    line-height: 1;
}

.average-rating .rating-stars {
    margin: 0.5rem 0;
    justify-content: center;
}

.average-rating .star {
    font-size: 1.5rem;
    color: var(--gold);
}

.rating-label {
    font-size: 14px;
    color: var(--text-gray);
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-bar .rating-label {
    min-width: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    transition: width 0.3s ease;
}

.rating-count {
    min-width: 30px;
    text-align: right;
    font-size: 14px;
    color: var(--text-gray);
}

/* Сетка отзывов */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Карточка отзыва */
.review-card {
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.review-card:hover {
    border-color: var(--gold);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
}

.reviewer-details h4 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1rem;
}

.review-date {
    color: var(--text-gray);
    font-size: 12px;
}

.review-rating {
    display: flex;
    gap: 0.25rem;
}

.review-rating .star {
    font-size: 1.25rem;
}

.review-rating .star.filled {
    color: var(--gold);
}

.review-content {
    margin-bottom: 1rem;
}

.review-title {
    margin: 0 0 0.5rem 0;
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

.review-text {
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
}

/* Категории оценок в отзыве */
.review-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(245, 245, 245, 0.5);
    border-radius: 10px;
}

.category-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
}

.category-score span {
    color: var(--text-gray);
    font-weight: 600;
}

.category-score .star {
    font-size: 14px;
}

/* Действия с отзывом */
.review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-helpful-btn {
    background: none;
    border: 1px solid var(--light-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: var(--text-gray);
}

.review-helpful-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
}

/* Пагинация */
.reviews-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.review-page-btn {
    background: transparent;
    border: 2px solid var(--light-gray);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-gray);
}

.review-page-btn.active,
.review-page-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
}

/* Нет отзывов */
.no-reviews {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

.no-reviews p {
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .review-modal-content {
        margin: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
    }

    .review-form {
        padding: 0 1rem 1rem;
    }

    .review-modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }

    .review-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .review-form-row input,
    .review-form-row select,
    .review-form-row textarea {
        font-size: 16px;
        /* iOS zoom prevention */
        min-height: 48px;
        padding: 0.875rem 1rem;
    }

    .category-ratings {
        gap: 1rem;
    }

    .category-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .category-rating label {
        min-width: auto;
        font-size: 0.95rem;
    }

    .review-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .review-actions button {
        width: 100%;
        min-height: 48px;
    }

    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .review-stats-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .reviews-filters {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .reviews-filters button {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .rating-bar {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .star {
        font-size: 2.5rem;
        padding: 0.25rem;
        min-width: 48px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .category-stars .star {
        font-size: 1.5rem;
        min-width: 40px;
        min-height: 40px;
    }

    .review-card {
        padding: 1rem;
    }

    .reviewer-info {
        gap: 0.75rem;
    }

    .reviewer-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }

    .review-categories {
        gap: 0.5rem;
    }

    .category-score {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .review-form input,
    .review-form select {
        font-size: 16px;
        min-height: 50px;
        padding: 1rem;
    }

    .review-form textarea {
        font-size: 16px;
        min-height: 120px;
        padding: 1rem;
    }

    .review-actions button {
        min-height: 52px;
        font-size: 1.125rem;
    }

    .reviews-filters button {
        width: 100%;
        max-width: 200px;
        min-height: 48px;
    }

    /* Fullscreen animation для review modal */
    .review-modal.show .review-modal-content {
        animation: slideUpReview 0.3s ease-out;
    }

    @keyframes slideUpReview {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }
}