/* CSS สำหรับปรับแต่ง Rating UI */

/* ปรับแต่งปุ่มการให้คะแนนพร้อมกัน */
.batch-rating-controls {
    padding: 0.75rem;
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 0.8rem;
    margin: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px dashed rgba(0, 123, 255, 0.2);
    transition: all 0.3s ease;
}

.batch-rating-controls:hover {
    background-color: rgba(0, 123, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.batch-rating-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.batch-rate {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid var(--neutral-300);
    background-color: white;
    font-weight: 600;
}

.batch-rate:hover {
    transform: scale(1.1);
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
}

/* ปรับแต่งคำถาม */
.question-card {
    transition: all 0.3s ease;
    margin-bottom: 1.8rem;
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.question-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

.question-card .form-label {
    font-weight: 500;
    color: var(--neutral-800);
    position: relative;
    padding-bottom: 0.75rem;
}

.question-card .form-label::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--primary-light);
    border-radius: 2px;
}

/* ปรับแต่งกลุ่มคำถาม */
.question-group-header {
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    text-align: center;
    font-weight: 500;
    padding-bottom: 15px;
}

.question-group-header::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
}

/* จัดการปุ่มให้อยู่ตรงกลาง */
.rating-group {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1rem auto 1.5rem;
    gap: 12px;
    width: fit-content;
}

.rating-item {
    margin: 0;
    position: relative;
}

.rating-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: white;
    color: var(--neutral-700);
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid var(--neutral-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rating-input:checked + .rating-circle, 
.rating-circle.selected {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(45, 60, 142, 0.25);
}

.rating-circle:hover {
    background-color: var(--primary-light);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(45, 60, 142, 0.2);
}

/* ปรับปรุงการแสดงผล label สำหรับสเกลคะแนน */
.rating-scale-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 290px;
    margin: 0.25rem auto 0.75rem;
    font-size: 0.85rem;
    color: var(--neutral-600);
}

/* เพิ่ม transition เมื่อกด rating */
.rating-circle.selected {
    animation: pulse 0.3s ease;
}

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

/* ปรับแต่ง textarea */
.question-card textarea {
    border: 2px solid var(--neutral-300);
    border-radius: 8px;
    padding: 12px;
    min-height: 120px;
    transition: all 0.3s ease;
}

.question-card textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(45, 60, 142, 0.2);
}

/* ปรับปรุงการแสดงผลบนอุปกรณ์มือถือ */
@media (max-width: 576px) {
    .rating-group {
        gap: 8px;
    }
    
    .rating-circle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .batch-rate {
        width: 35px;
        height: 35px;
    }
}

/* Animation for questions */
.question-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

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

/* Delay animation for questions */
.question-card:nth-child(1) { animation-delay: 0.1s; }
.question-card:nth-child(2) { animation-delay: 0.2s; }
.question-card:nth-child(3) { animation-delay: 0.3s; }
.question-card:nth-child(4) { animation-delay: 0.4s; }
.question-card:nth-child(5) { animation-delay: 0.5s; }
