/* ================================================================
   Accessibility Rating Modal  (arm-*)
   WCAG 2.1 AA
   ================================================================ */

.arm-content
{
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* ── Allgemeine Schritt-Wrapper ─────────────────────────────── */

.arm-step
{
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    gap: 0;
}

.arm-step[hidden]
{
    display: none;
}

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

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

/* ── Suchfeld ───────────────────────────────────────────────── */

.arm-search
{
    margin-bottom: 0.75rem;
}

.arm-search__input
{
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.arm-search__input:focus
{
    outline: 3px solid #0057b7;
    outline-offset: 1px;
}

/* ── Kriterien-Liste ────────────────────────────────────────── */

.arm-criteria-list
{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow-y: auto;
    flex: 1;
}

.arm-criteria-list__loading,
.arm-criteria-list__empty,
.arm-criteria-list__error
{
    padding: 1rem;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

.arm-criteria-list__error
{
    color: #b91c1c;
}

.arm-criteria-item
{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 6px;
    cursor: pointer;
    background: var(--color-background, #fff);
    transition: background 0.1s, border-color 0.1s;
}

.arm-criteria-item:hover,
.arm-criteria-item:focus
{
    background: #f0f7ff;
    border-color: #0057b7;
    outline: none;
}

.arm-criteria-item:focus-visible
{
    outline: 3px solid #0057b7;
    outline-offset: 2px;
}

.arm-criteria-item__name
{
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
}

.arm-criteria-item__desc
{
    font-size: 0.82rem;
    color: #666;
    flex: 1;
    display: block;
    margin-top: 0.1rem;
}

.arm-criteria-item__arrow
{
    color: #aaa;
    flex-shrink: 0;
}

/* ── Detail-Ansicht ─────────────────────────────────────────── */

.arm-back
{
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary, #0057b7);
    font-size: 0.9rem;
    padding: 0;
    margin-bottom: 0.75rem;
    font-family: inherit;
}

.arm-back:hover
{
    text-decoration: underline;
}

.arm-back:focus-visible
{
    outline: 3px solid #0057b7;
    outline-offset: 2px;
    border-radius: 2px;
}

.arm-detail__name
{
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.arm-detail__description
{
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
}

/* ── Definitionen ───────────────────────────────────────────── */

.arm-definitions
{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.arm-def
{
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    border-left: 4px solid transparent;
}

.arm-def--met
{
    background: #f0fdf4;
    border-color: #22c55e;
}

.arm-def--partial
{
    background: #fffbeb;
    border-color: #f59e0b;
}

.arm-def--not-met
{
    background: #fef2f2;
    border-color: #ef4444;
}

.arm-def__label
{
    font-size: 0.82rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.2rem;
}

.arm-def__text
{
    font-size: 0.85rem;
    color: #444;
    margin: 0;
}

/* ── Rating-Optionen ────────────────────────────────────────── */

.arm-rating-fieldset
{
    border: none;
    padding: 0;
    margin: 0 0 1rem;
}

.arm-rating-fieldset legend
{
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.arm-rating-options
{
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.arm-rating-option
{
    flex: 1 1 auto;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 0.5rem;
    border: 2px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    background: var(--color-background, #fff);
}

.arm-rating-option input[type="radio"]
{
    /* visuell versteckt, aber fokussierbar */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.arm-rating-option:has(input:checked),
.arm-rating-option:hover
{
    border-color: currentColor;
}

.arm-rating-option--met:has(input:checked),
.arm-rating-option--met:hover
{
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

.arm-rating-option--partial:has(input:checked),
.arm-rating-option--partial:hover
{
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.arm-rating-option--not-met:has(input:checked),
.arm-rating-option--not-met:hover
{
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.arm-rating-option input:focus-visible ~ .arm-rating-option__icon
{
    outline: 3px solid #0057b7;
    outline-offset: 2px;
    border-radius: 2px;
}

.arm-rating-option__icon
{
    font-size: 1.4rem;
    line-height: 1;
    font-weight: 700;
}

.arm-rating-option__label
{
    font-size: 0.82rem;
    font-weight: 600;
}

/* ── Kontextuelle Definition (nach Rating-Auswahl) ──────────── */

.arm-def--contextual
{
    margin-bottom: 1rem;
    animation: arm-fadein 0.15s ease;
}

@keyframes arm-fadein
{
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

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

.arm-form__field textarea
{
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.arm-form__field textarea:focus
{
    outline: 3px solid #0057b7;
    outline-offset: 1px;
}

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

.arm-form__error
{
    color: #b91c1c;
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
}

/* ── Erfolgs-Schritt ────────────────────────────────────────── */

.arm-success
{
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    gap: 1rem;
}

.arm-success__icon
{
    width: 3rem;
    height: 3rem;
    color: #22c55e;
}

.arm-success__text
{
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.arm-success__hint
{
    font-size: 0.88rem;
    color: #555;
    margin: 0;
    max-width: 360px;
}
