/* KI-Hilfe an Aufgaben (Schüler) */

.exercise-levels-btn.ai-help-toggle {
    font-style: normal;
    font-weight: 700;
}

.exercise-levels-btn.ai-help-toggle[aria-expanded="true"] {
    color: #3d684a;
    border-color: rgba(74, 124, 89, 0.65);
    background: rgba(74, 124, 89, 0.12);
}

.ai-help {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(26, 26, 46, 0.14);
}

.ai-help__panel {
    padding: 0.85rem 0.95rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(26, 26, 46, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.06);
}

.ai-help__disclaimer {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #3d684a;
    font-weight: 600;
}

.ai-help__meta {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    color: #5a6170;
}

.ai-help__teacher-full {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0.65rem;
    border: 1px solid rgba(61, 104, 74, 0.45);
    background: rgba(74, 124, 89, 0.12);
    color: #2a2f3a;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 650;
    cursor: pointer;
}

.ai-help__teacher-full[hidden] {
    display: none;
}

.ai-help__teacher-full:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ai-help__teacher-full:not(:disabled):hover {
    background: rgba(74, 124, 89, 0.2);
}

.ai-help__messages {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.ai-help__msg {
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-help__msg--user {
    align-self: flex-end;
    background: rgba(26, 26, 46, 0.08);
    color: #1a1a2e;
    max-width: 92%;
}

.ai-help__msg--bot {
    align-self: flex-start;
    background: rgba(74, 124, 89, 0.12);
    color: #1a1a2e;
    max-width: 95%;
}

.ai-help__msg--bot mjx-container {
    font-size: 105%;
}

.ai-help__empty {
    font-size: 0.88rem;
    line-height: 1.4;
    color: #5a6170;
    padding: 0.35rem 0.15rem;
}

.ai-help__input-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #2a2f3a;
}

.ai-help__input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(26, 26, 46, 0.16);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    font: inherit;
    resize: vertical;
    min-height: 4.2rem;
    background: #fff;
}

.ai-help__actions {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.ai-help__send {
    border: none;
    background: #1a1a2e;
    color: #fff;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-weight: 650;
    cursor: pointer;
}

.ai-help__send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ai-help__error {
    color: #9b1c1c;
    font-size: 0.85rem;
}
