﻿:root {
}

.reviews-hero {
    padding: 0 2rem 2rem;
}

.page-title {
    max-width: 750px;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 5rem;
    background: var(--bg);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    margin: 0 auto;
    max-width: 1000px;
    box-shadow: var(--shadow);
}

    .reviews-score {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        min-width: 100px;
    }

.score-number {
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.score-stars {
    display: flex;
    gap: 0.2rem;
    color: var(--star);
    margin-top: 8px;
    font-size: 1.4rem;
}

.score-count {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.reviews-distribution {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.distribution-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}

    .distribution-row:hover:not(.disabled) {
        background: var(--bg-hover);
    }

    .distribution-row.active {
        background: var(--bg-hover);
    }

    .distribution-row.disabled {
        opacity: 0.4;
        cursor: default;
    }

.distribution-stars {
    display: flex;
    gap: 0.15rem;
    color: var(--star);
    font-size: 0.9rem;
    min-width: 105px;
}

.distribution-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.distribution-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.distribution-count {
    font-size: 0.925rem;
    color: var(--text-secondary);
    min-width: 20px;
    text-align: right;
}

.btn-leave-review {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

    .btn-leave-review:hover {
        background: var(--accent-hover);
    }

/* Reviews list */
.reviews-list-section {
    padding: 2rem 2rem 6rem;
}

    .reviews-list-section .container {
        border-top: 1px solid var(--border);
        max-width: 1000px;
        margin: 0 auto;
    }

.review-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 24px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.review-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.review-date {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.review-stars {
    display: flex;
    gap: 0.2rem;
    color: var(--star);
    font-size: 1rem;
    margin-bottom: 24px;
}

    .review-stars .active {
        color: var(--star);
    }

    .review-stars .fa-star:not(.active) {
        color: var(--border);
    }

.review-comment {
    color: var(--text-alt);
    font-size: 1.05rem;
    line-height: 1.6;
    white-space: pre-wrap;
    margin: 0;
}

/* Load more */
#load-more-container {
    text-align: center;
    padding: 2rem 0;
}

#btn-load-more {
    padding: 0.75rem 2rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

    #btn-load-more:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

.hidden {
    display: none !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    margin: 0 24px;
    max-width: 650px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.star-picker {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
}

.star-pick {
    font-size: 1.6rem;
    color: var(--border);
    cursor: pointer;
    transition: color 0.1s;
}

    .star-pick.active {
        color: var(--star);
    }

.review-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    min-height: 180px;
    resize: vertical;
    color: var(--text-primary);
    background: var(--bg-primary);
    box-sizing: border-box;
}

    .review-textarea:focus {
        outline: none;
        border-color: var(--accent);
        border-width: 2px;
    }

.review-char-count {
    display: block;
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

#btn-submit-review {
    width: 100%;
    padding: 0 0.875rem;
    height: 44px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

    #btn-submit-review:hover {
        background: var(--accent-hover);
    }

.btn-spinner-active {
    width: 20px;
    height: 20px;
    animation: spin 0.7s linear infinite;
    justify-self: center;
    display: block;
}

/* Responsive */
@media (max-width: 940px) {
    .reviews-summary {
        flex-direction: column;
        gap: 3rem;
        align-items: stretch;
        padding: 24px;
    }

    .reviews-score {
        align-self: center;
    }

    .reviews-distribution {
        width: 100%;
        max-width: 500px;
        align-self: center;
    }

    .btn-leave-review {
        align-self: center;
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 640px) {
   
    .reviews-hero {
        padding: 0 24px 2rem;
    }

    .reviews-list-section {
        padding: 2rem 24px 6rem;
    }

    .modal-box {
        padding: 2rem 1.5rem;
    }

    .review-textarea {
        min-height: 250px;
    }
}
