/* ===================================
   Ratings Section Styles
   =================================== */

.ratings-section {
    padding: 60px 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.ratings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFA500, #FFCC00, #FFA500);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

.ratings-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.ratings-section .section-header h2 {
    font-size: 2.5rem;
    color: #000000;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.ratings-section .section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #FFA500;
    border-radius: 2px;
}

.ratings-section .section-header p {
    color: #666666;
    font-size: 1.1rem;
    margin-top: 20px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Rating Form Container */
.rating-form-container {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #e0e0e0;
}

.rating-form-container h3 {
    color: #000000;
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

/* Rating Form */
.rating-form .form-group {
    margin-bottom: 20px;
}

.rating-form label {
    display: block;
    color: #333333;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.rating-form label i {
    color: #FFA500;
    margin-right: 6px;
}

.rating-form input[type="text"],
.rating-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.rating-form input[type="text"]:focus,
.rating-form textarea:focus {
    outline: none;
    border-color: #FFA500;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.rating-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Star Rating */
.star-rating {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 15px 0;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating .star {
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.star-rating .star i {
    color: #FFA500;
    transition: all 0.3s ease;
}

.star-rating .star:hover,
.star-rating .star.active {
    transform: scale(1.15);
}

.star-rating input[type="radio"]:checked ~ .star i {
    color: #FFA500;
}

/* Submit Button */
.btn-submit-rating {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(255, 165, 0, 0.3);
}

.btn-submit-rating:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.4);
    background: linear-gradient(135deg, #FF8C00 0%, #FFA500 100%);
}

.btn-submit-rating:active {
    transform: translateY(0);
}

.btn-submit-rating:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Rating Messages */
.rating-message {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 16px;
    animation: slideInUp 0.4s ease;
}

.rating-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.rating-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.rating-message i {
    font-size: 24px;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Approved Ratings Container */
.approved-ratings-container {
    margin-top: 40px;
    animation: fadeInSection 0.8s ease;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.approved-ratings-container h3 {
    color: #000000;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    position: relative;
    animation: titleSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.approved-ratings-container h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: #FFA500;
    border-radius: 2px;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ratings Carousel Container */
.ratings-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    overflow: visible;
    width: 100%;
    padding: 20px 0;
}

/* Carousel Row */
.carousel-row {
    display: flex;
    overflow: visible;
    width: 100%;
    padding: 15px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Pause animation on hover */
.carousel-row:hover .carousel-track {
    animation-play-state: paused;
}

/* Carousel Track */
.carousel-track {
    display: flex;
    gap: 20px;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    overflow: visible;
}

/* Scroll Left Animation */
.scroll-left .carousel-track {
    animation: scrollLeft 40s linear infinite;
}

/* Scroll Right Animation */
.scroll-right .carousel-track {
    animation: scrollRight 40s linear infinite;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-33.333%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Rating Card */
.rating-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
}

/* Hover effect with bounce and float */
.rating-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    border-color: #FFCC00;
    animation: continuousFloat 3s ease-in-out infinite;
}

@keyframes continuousFloat {
    0%, 100% {
        transform: translateY(-8px) scale(1.02);
    }
    50% {
        transform: translateY(-12px) scale(1.02);
    }
}

/* Pulse animation for stars on hover */
.rating-card:hover .rating-stars i.filled {
    animation: starPulse 0.6s ease infinite;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Smooth avatar rotation on hover */
.rating-card:hover .rating-avatar {
    transform: rotate(360deg);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rating-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.rating-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rating-info {
    flex: 1;
    min-width: 0;
}

.rating-name {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.rating-stars i {
    font-size: 14px;
}

.rating-stars i.filled {
    color: #FFCC00;
}

.rating-stars i.far {
    color: #ddd;
}

.rating-card-body {
    margin: 12px 0;
    position: relative;
}

.rating-comment {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

/* Highlight comment on hover */
.rating-card:hover .rating-comment {
    color: #333333;
}

.rating-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.rating-date {
    color: #999999;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating-date i {
    font-size: 11px;
}

/* Loading and Empty States */
.loading-ratings,
.no-ratings,
.error-loading-ratings {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
}

.loading-ratings i,
.no-ratings i,
.error-loading-ratings i {
    font-size: 36px;
    margin-bottom: 15px;
    display: block;
}

.loading-ratings i {
    color: #000000;
}

.no-ratings i {
    color: #FFCC00;
}

.error-loading-ratings i {
    color: #DD0000;
}

.loading-ratings p,
.no-ratings p,
.error-loading-ratings p {
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ratings-section {
        padding: 40px 0;
    }

    .rating-form-container {
        padding: 25px 20px;
    }

    .rating-form-container h3 {
        font-size: 20px;
    }

    .ratings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .approved-ratings-container h3 {
        font-size: 22px;
    }

    .star-rating .star {
        font-size: 26px;
    }

    .btn-submit-rating {
        font-size: 15px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .rating-form-container {
        padding: 20px 15px;
    }

    .rating-card {
        padding: 16px;
    }

    .star-rating .star {
        font-size: 24px;
        gap: 6px;
    }
}

/* Smooth Slide-in Animation (Windsurf-style) */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rating-card.slide-in {
    animation: slideInFromLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
