/* ================================================================
   Review-Modal
   WCAG 2.1 AA
   ================================================================ */

.review-modal-content
{
    max-width: 560px;
}

.review-modal__title
{
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.review-modal__subtitle
{
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1.25rem;
}

/* ── Sternebewertung ─────────────────────────────────────── */

.star-rating
{
    border: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
}

.star-rating__input
{
    /* visuell versteckt, aber fokussierbar */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.star-rating__label
{
    cursor: pointer;
    display: inline-flex;
    padding: 0.15rem;
    color: #ccc;
    transition: color 0.1s;
}

.star-rating__star
{
    width: 2rem;
    height: 2rem;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1;
}

/* Aktiv- und Hover-Zustand werden per JS gesetzt */
.star-rating__label.is-hovered,
.star-rating__label.is-selected
{
    color: #f5a623;
}

/* Fokus-Ring für Tastaturnavigation */
.star-rating__input:focus-visible + .star-rating__label .star-rating__star
{
    outline: 3px solid #0057b7;
    outline-offset: 2px;
    border-radius: 2px;
}

.star-rating__hint
{
    width: 100%;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    min-height: 1.2em;
}

/* ── Formularfelder ──────────────────────────────────────── */

.review-form__field
{
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.review-form__field label
{
    font-weight: 600;
    font-size: 0.9rem;
}

.review-form__optional
{
    font-weight: 400;
    color: #888;
    font-size: 0.85rem;
}

.review-form__field input[type="text"],
.review-form__field textarea
{
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.review-form__field input[type="text"]:focus,
.review-form__field textarea:focus
{
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(26,115,232,0.25);
}

.review-form__char-count
{
    font-size: 0.78rem;
    color: #888;
    text-align: right;
}

.review-form__hint
{
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.4rem;
}

.review-form__error
{
    color: #c0392b;
    font-size: 0.9rem;
    background: #ffeaea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

/* ── Bildupload ──────────────────────────────────────────── */

.review-images-fieldset
{
    border: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.review-images-fieldset legend
{
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.review-image-slots
{
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.review-image-slot
{
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.review-image-slot__trigger
{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border: 2px dashed var(--color-border);
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    color: #888;
    font-size: 0.72rem;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    padding: 0;
}

.review-image-slot__trigger:hover
{
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #f0f5ff;
}

.review-image-slot__trigger:focus-visible
{
    outline: 3px solid #0057b7;
    outline-offset: 2px;
}

.review-image-slot__label
{
    display: block;
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
}

.review-image-slot__preview
{
    position: absolute;
    inset: 0;
}

.review-image-slot__preview img
{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.review-image-slot__remove
{
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.review-image-slot__remove:hover
{
    background: rgba(192,57,43,0.9);
}

.review-image-slot__remove:focus-visible
{
    outline: 3px solid #0057b7;
    outline-offset: 2px;
}

/* ── Erfolgsanzeige ─────────────────────────────────────── */

.review-success
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
    text-align: center;
}

.review-success[hidden]
{
    display: none;
}

.review-success__icon
{
    width: 3.5rem;
    height: 3.5rem;
    color: #27ae60;
}

.review-success__text
{
    font-size: 1.1rem;
    font-weight: 600;
}
