/* ================================================================
   Correction Modal  (crm-*)
   WCAG 2.1 AA
   ================================================================ */

.crm-content
{
    max-width: 540px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

/* ── Schritte ───────────────────────────────────────────────── */

.crm-step
{
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

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

.crm__title
{
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.crm__subtitle
{
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* ── Feldliste ──────────────────────────────────────────────── */

.crm-fields
{
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
}

.crm-field
{
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    background: var(--color-background, #fff);
    transition: background 0.1s;
}

.crm-field:last-child
{
    border-bottom: none;
}

.crm-field.is-dirty
{
    background: #f0f7ff;
}

.crm-field__label
{
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Geändert-Indikator */
.crm-field.is-dirty .crm-field__label::after
{
    content: '●';
    color: #1d4ed8;
    font-size: 0.55rem;
    line-height: 1;
}

.crm-field__input
{
    border: none;
    outline: none;
    padding: 0;
    background: transparent;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1e293b;
    width: 100%;
    resize: none;
    line-height: 1.5;
}

.crm-field__input:focus
{
    outline: none;
}

/* Fokus-Ring auf dem Wrapper */
.crm-field:focus-within
{
    outline: 3px solid #0057b7;
    outline-offset: -2px;
    border-radius: 6px;
}

/* ── Begründungsfeld ─────────────────────────────────────────── */

.crm-reason-field
{
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

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

.crm-reason-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;
}

.crm-reason-field textarea:focus
{
    outline: 3px solid #0057b7;
    outline-offset: 1px;
}

/* ── Hinweis-Banner ─────────────────────────────────────────── */

.crm-form__notice
{
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #475569;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.crm-form__notice svg
{
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: #64748b;
}

/* ── Fehler ─────────────────────────────────────────────────── */

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

/* ── Erfolg ─────────────────────────────────────────────────── */

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

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

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

.crm-success__hint
{
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    max-width: 340px;
    line-height: 1.5;
}
