﻿   
/* ====================================================================
   RATING MODULE - BỘ CÔNG AN
   Module đánh giá người dùng ở cuối trang
   ==================================================================== */

.rating-module {
    background: linear-gradient(135deg, #FDF1DE 0%, #FEEBF0 100%);
    padding: 3rem 1rem;
    margin-top: 4rem;
    border-radius:15px;
    border-top: 4px solid #BA0C2F;
}


/* Total Stats Bar */
.total-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #FDF1DE 0%, #FEEBF0 100%);
    border-radius: 12px;
    border: 2px solid #BA0C2F;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #BA0C2F;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: #555555;
    margin-top: 0.25rem;
    font-weight: 600;
}

.stat-divider {
    width: 2px;
    height: 40px;
    background: #BA0C2F;
    opacity: 0.3;
}

.rating-label {
    min-height: 160px !important;
}

.rating-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #E9E9E9;
    width: 100%;
}

.count-number {
    font-size: 20px;
    font-weight: 700;
    color: #BA0C2F;
    line-height: 1;
}

.count-label {
    font-size: 11px;
    color: #9D9D9D;
    margin-top: 0.25rem;
}

.rating-progress {
    width: 100%;
    height: 4px;
    background: #F5F5F5;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #BA0C2F;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.rating-excellent .progress-fill { background: #10B981; }
.rating-good .progress-fill { background: #3B82F6; }
.rating-normal .progress-fill { background: #F59E0B; }
.rating-bad .progress-fill { background: #EF4444; }

.rating-excellent .count-number { color: #059669; }
.rating-good .count-number { color: #2563EB; }
.rating-normal .count-number { color: #D97706; }
.rating-bad .count-number { color: #DC2626; }

@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.count-number {
    animation: countUp 0.5s ease;
}

@media (max-width: 768px) {
    .total-stats {
        flex-direction: column;
        gap: 1rem;
    }
    .stat-divider {
        width: 100%;
        height: 2px;
    }
}
.rating-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(186, 12, 47, 0.1);
}

.rating-header {
    text-align: center;
    margin-bottom: 2rem;
}

.rating-header h3 {
    color: #BA0C2F;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.rating-header p {
    color: #555555;
    font-size: 15px;
}

/* Rating Options Grid */
.rating-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.rating-option {
    position: relative;
}

.rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border: 2px solid #E9E9E9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-height: 120px;
}

.rating-icon {
    font-size: 36px;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.rating-text {
    font-size: 14px;
    font-weight: 600;
    color: #434343;
    text-align: center;
}

/* Hover Effects */
.rating-label:hover {
    border-color: #BA0C2F;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(186, 12, 47, 0.15);
}

.rating-label:hover .rating-icon {
    transform: scale(1.15);
}

/* Selected State */
.rating-option input[type="radio"]:checked + .rating-label {
    border-color: #BA0C2F;
    background: linear-gradient(135deg, #FDF1DE 0%, #FEEBF0 100%);
    border-width: 3px;
}

.rating-option input[type="radio"]:checked + .rating-label .rating-text {
    color: #BA0C2F;
    font-weight: 700;
}

.rating-option input[type="radio"]:checked + .rating-label .rating-icon {
    transform: scale(1.2);
}

/* Individual Rating Colors */
.rating-excellent:hover,
.rating-option input[type="radio"]:checked + .rating-excellent {
    border-color: #10B981;
}

.rating-option input[type="radio"]:checked + .rating-excellent {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
}

.rating-option input[type="radio"]:checked + .rating-excellent .rating-text {
    color: #059669;
}

.rating-good:hover,
.rating-option input[type="radio"]:checked + .rating-good {
    border-color: #3B82F6;
}

.rating-option input[type="radio"]:checked + .rating-good {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.rating-option input[type="radio"]:checked + .rating-good .rating-text {
    color: #2563EB;
}

.rating-normal:hover,
.rating-option input[type="radio"]:checked + .rating-normal {
    border-color: #F59E0B;
}

.rating-option input[type="radio"]:checked + .rating-normal {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.rating-option input[type="radio"]:checked + .rating-normal .rating-text {
    color: #D97706;
}

.rating-bad:hover,
.rating-option input[type="radio"]:checked + .rating-bad {
    border-color: #EF4444;
}

.rating-option input[type="radio"]:checked + .rating-bad {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
}

.rating-option input[type="radio"]:checked + .rating-bad .rating-text {
    color: #DC2626;
}

/* Comment Section */
.comment-section {
    margin-top: 1.5rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.comment-section.active {
    opacity: 1;
    max-height: 500px;
}

.comment-label {
    display: block;
    font-weight: 600;
    color: #434343;
    margin-bottom: 0.75rem;
    font-size: 15px;
}

.comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #E9E9E9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: all 0.3s ease;
}

.comment-textarea:focus {
    outline: none;
    border-color: #BA0C2F;
    box-shadow: 0 0 0 3px rgba(186, 12, 47, 0.1);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #9D9D9D;
    margin-top: 0.5rem;
}

/* Submit Button */
.submit-section {
    margin-top: 2rem;
    text-align: center;
}

.submit-btn {
    background: #BA0C2F;
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background: #8B0A23;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(186, 12, 47, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #D9D9D9;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 2rem;
}

.success-message.active {
    display: block;
}

.success-icon {
    font-size: 64px;
    color: #10B981;
    margin-bottom: 1rem;
}

.success-text {
    font-size: 20px;
    font-weight: 700;
    color: #BA0C2F;
    margin-bottom: 0.5rem;
}

.success-subtext {
    font-size: 15px;
    color: #555555;
}

/* Responsive */
@media (max-width: 768px) {
    .rating-container {
        padding: 1.5rem;
    }

    .rating-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .rating-header h3 {
        font-size: 20px;
    }

    .submit-btn {
        width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .rating-options {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rating-container {
    animation: fadeInUp 0.6s ease;
}