/* General Styles */
.hotel-reviews-form-container,
.hotel-reviews-display-container {
    max-width: 1200px;
    margin: 2em auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Form Styles */
.hotel-reviews-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

.ratings-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.rating-group {
    margin: 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #eee;
}

.rating-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Fields */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Submit Button */
.submit-review {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-review:hover {
    background-color: #218838;
}

.submit-review:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
}

/* Overall Section */
.overall-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
}

.reviews-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

.ratings-layout {
    display: flex;
    gap: 40px;
}

.rating-box {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    background: var(--primary-color, #dc3545);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.rating-number {
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.rating-text {
    font-size: 14px;
}

.rating-count {
    font-size: 12px;
    margin-top: 2px;
}

/* Detailed Ratings */
.detailed-ratings {
    flex-grow: 1;
}

.ratings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 40px;
}

.rating-bar {
    margin-bottom: 0;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rating-label {
    font-weight: 400;
    color: #333;
    flex: 1;
}

.rating-value {
    font-weight: 400;
    color: #333;
    margin-left: 15px;
}

.progress {
    height: 4px;
    background-color: #eee;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color, #dc3545);
}

/* Grid Layout */
.row {
    display: block;
    margin: 0;
}

.col-md-3, .col-md-9, .col-md-6 {
    width: 100%;
    padding: 0;
}

/* Reviews List */
.reviews-list {
    margin-top: 30px;
}

.reviews-list h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.review-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.review-header {
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reviewer-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-rating {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.review-date {
    color: #6c757d;
    font-size: 14px;
}

.review-text {
    color: #495057;
    line-height: 1.6;
    margin-top: 15px;
}

.review-text.hidden {
    display: none;
}

.review-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.mini-rating {
    width: calc(50% - 8px);
}

.rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.mini-label {
    font-weight: 500;
    color: #495057;
    flex: 1;
    margin-right: 15px;
}

.rating-stars {
    display: inline-flex;
    gap: 5px;
}

.star {
    color: #ddd;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.star:hover,
.star.active,
.star.filled {
    color: #ffc107;
}

.star:hover ~ .star {
    color: #ddd;
}

.rating-stars:hover .star {
    color: #ffc107;
}

.rating-stars .star:hover ~ .star {
    color: #ddd;
}

.load-more-button {
    display: block;
    width: 200px;
    margin: 30px auto;
}

/* Messages */
#review-submission-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

#review-submission-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#review-submission-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ratings-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .rating-box {
        width: 120px;
        height: 120px;
    }
    
    .rating-number {
        font-size: 42px;
    }
    
    .ratings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .review-item {
        padding: 15px;
    }
    
    .mini-rating {
        width: 100%;
    }

    .rating-row {
        flex-direction: row;
        justify-content: space-between;
    }

    .mini-label {
        margin-right: 10px;
    }

    .rating-stars {
        min-width: 90px;
    }

    .reviewer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .ratings-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .submit-review {
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ratings-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Modal Styles */
.review-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-modal.active {
    display: flex;
    opacity: 1;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.review-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-right: 40px;
}

.modal-review-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    color: #666;
}

.modal-ratings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.modal-rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-rating-label {
    font-weight: 500;
    color: #333;
}

.modal-review-text {
    margin-top: 20px;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    white-space: pre-line;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .modal-ratings {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
}

/* Make review rating clickable */
.review-rating {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.review-rating:hover {
    transform: scale(1.1);
} 