/* c:\xampp\htdocs\cce32023\assets\css\cartRatings.css */
.ratings-section {
    background-color: #f9f9f9;
    padding: 30px;
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ratings-section h3 {
    text-align: center;
    color: #333;
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 16px;
}

.rating-summary {
    text-align: center;
    margin-bottom: 30px;
}

.rating-summary .average {
    font-size: 32px;
    font-weight: bold;
    color: #ffb400;
}

.rating-summary .stars-display {
    color: #ffb400;
    font-size: 16px;
    margin-bottom: 5px;
}

.rating-summary .total-reviews {
    color: #666;
    font-size: 14px;
}

#ratingsList {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.rating-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 15px;
}

.rating-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.rating-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rating-content {
    flex-grow: 1;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.rating-author {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.rating-date {
    font-size: 12px;
    color: #999;
}

.rating-stars {
    color: #ffb400;
    font-size: 12px;
    margin-bottom: 6px;
}

.rating-text {
    color: #444;
    font-size: 13px;
    line-height: 1.4;
}

.btn-add-rating {
    display: inline-block;
    width: auto;
    max-width: 300px;
    margin: 0;
    padding: 8px 16px;
    background-color: #0b2d6a;
    color: #fff;
    text-align: center;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-add-rating:hover {
    background-color: #082150;
}

/* Modal Styling */
.modal-rating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-rating-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-rating-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin-bottom: 20px;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.star-rating-input label:hover,
.star-rating-input label:hover~label,
.star-rating-input input:checked~label {
    color: #ffb400;
}

/* === Global overrides for ratings-layout-row (container query conflicts) === */
.ratings-layout-row .rating {
    margin-left: 0 !important;
    margin-top: 0 !important;
}

/* === Responsive: small screens === */
@media (max-width: 768px) {
    .ratings-layout-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
    }

    /* .ratings-layout-row .requirements-content {
        flex-shrink: unset !important;
        text-align: center;
        width: 100%;
    } */

    .ratings-layout-row .rating {
        padding: 0 !important;
        margin: 0 !important;
        justify-content: center;
    }

    .ratings-layout-row .rating-container {
        justify-content: center !important;
    }

    .ratings-layout-row .breakdown,
    .ratings-layout-row .stars {
        align-items: center !important;
        justify-content: center !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .ratings-layout-row .five-star {
        text-align: center;
    }

    .ratings-layout-row .rating-del-curso {
        text-align: center;
        justify-content: center;
    }

    .ratings-layout-row .star-distribution {
        width: 100% !important;
        min-width: 0 !important;
    }

    .modal-rating-content {
        margin: 15px;
        max-width: calc(100% - 30px);
    }
}

/* @media (max-width: 480px) {
    .ratings-layout-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
    }

    .ratings-layout-row .requirements-content {
        flex-shrink: unset !important;
        text-align: center;
        width: 100%;
    }

    .ratings-layout-row .rating {
        padding: 0 !important;
        margin: 0 !important;
        justify-content: center;
    }

    .ratings-layout-row .rating-container {
        justify-content: center !important;
    }

    .ratings-layout-row .breakdown,
    .ratings-layout-row .stars {
        align-items: center !important;
        justify-content: center !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .ratings-layout-row .five-star {
        text-align: center;
    }

    .ratings-layout-row .rating-del-curso {
        text-align: center;
        justify-content: center;
    }

    .ratings-layout-row .star-distribution {
        width: 100% !important;
        min-width: 0 !important;
    }

    .modal-rating-content {
        margin: 15px;
        max-width: calc(100% - 30px);
    }
} */