/* ================================================
   RATING WIDGET — STIJLBLAD
   ================================================ */


/* ================================================
   SECTIE-CONTAINER
   ================================================ */

.rating-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 1200px;   /* Maximale breedte (pas aan naar eigen layout) */
    margin: 2rem auto;   /* Horizontaal gecentreerd */
}

/* Responsieve zijmarges op middelgrote schermen */
@media (max-width: 1280px) {
    .rating-section {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
}

/* Kleinere marges en opvulling op mobiel */
@media (max-width: 768px) {
    .rating-section {
        margin: 1.5rem 1rem;
        padding: 1.5rem;
    }
}


/* ================================================
   BEOORDELINGSHEADER
   ================================================ */

.rating-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.rating-header h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.5rem;
}


/* ================================================
   GEMIDDELDE BEOORDELING (sterren + cijfer + telling)
   ================================================ */

.average-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rating-stars {
    color: #fbbf24;
    font-size: 1.5rem;
}

.rating-stars i {
    margin-right: 2px;
}

.rating-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.rating-count {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Tekst bij nog geen beoordelingen */
.no-rating {
    color: #6b7280;
    font-style: italic;
}

/* Responsief: sterren en cijfer onder elkaar op mobiel */
@media (max-width: 768px) {
    .average-rating {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ================================================
   BEOORDELINGSFORMULIER
   ================================================ */

.rating-form-container h4 {
    margin: 0 0 1rem 0;
    color: #374151;
    font-size: 1.1rem;
}

/* Sterren-klikwidget (omgekeerde volgorde voor CSS-hover-truc) */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Verberg de radio-buttons; de labels dienen als klikbaar element */
.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 2.5rem;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Markeer ster bij hover en alle voorgaande sterren */
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input[type="radio"]:checked ~ label {
    color: #fbbf24;
    transform: scale(1.1);
}

.star-rating label:active {
    transform: scale(0.95);
}

/* Kleinere sterren op mobiel */
@media (max-width: 768px) {
    .star-rating label {
        font-size: 2rem;
    }
}


/* ================================================
   FORMULIERVELDEN
   ================================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #7B2CBF;
}

/* Tekenteller rechts onder het tekstveld */
.char-count {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}


/* ================================================
   TERUGKOPPELINGSBERICHTEN
   ================================================ */

.rating-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.rating-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
    display: block;
}

.rating-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
    display: block;
}


/* ================================================
   AL BEOORDEELD - BEVESTIGINGSBLOK
   ================================================ */

.already-rated {
    text-align: center;
    padding: 2rem;
    background: #f3f4f6;
    border-radius: 8px;
}

.already-rated i {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.already-rated p {
    margin: 0;
    color: #374151;
    font-size: 1.1rem;
}
