/*
 * ngager ask (unified platform R21; task 5.2). Student form and own list.
 * Usable from 320 px without horizontal scrolling (R21.6). No text-transform.
 */
.ask-student {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}
.ask-title {
    margin: 0 0 4px;
}
.ask-invitation {
    margin: 0 0 12px;
    font-size: 1.05em;
    color: #1f2937;
}
.ask-banner {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff4e5;
    color: #7a3e00;
    font-weight: 600;
}
.ask-banner[hidden],
.ask-message[hidden],
.ask-mine-empty[hidden] {
    display: none !important;
}
.ask-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ask-label {
    font-weight: 600;
}
.ask-text {
    width: 100%;
    min-height: 120px;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #6b7280;
    border-radius: 8px;
    font: inherit;
    font-size: 16px; /* no zoom on iPhone */
    resize: vertical;
}
.ask-text:focus {
    outline: 3px solid #1f3b73;
    outline-offset: 1px;
}
.ask-counter {
    align-self: flex-end;
    font-size: 0.9em;
    color: #4b5563;
    font-variant-numeric: tabular-nums;
}
.ask-counter--over {
    color: #b42318;
    font-weight: 700;
}
.ask-message {
    margin: 4px 0;
    padding: 8px 10px;
    border-radius: 6px;
}
.ask-message--error {
    background: #fdecea;
    color: #8a1c12;
}
.ask-message--success {
    background: #e7f5ec;
    color: #14532d;
}
.ask-send {
    min-height: 48px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: #1f3b73; /* white text 10.9:1 */
    color: #ffffff;
    font: inherit;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
}
.ask-send:focus-visible {
    outline: 3px solid #1f3b73;
    outline-offset: 3px;
}
.ask-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.ask-mine-title {
    margin: 24px 0 2px;
}
.ask-mine-note,
.ask-mine-empty {
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 0.9em;
}
.ask-mine-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ask-mine-item {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-left: 6px solid #1f3b73;
    border-radius: 8px;
    background: #ffffff;
}
.ask-mine-item--answered {
    border-left-color: #2e7d32;
}
.ask-mine-text {
    margin: 0 0 4px;
    white-space: pre-wrap;
}
.ask-mine-status {
    margin: 0;
    font-size: 0.9em;
    font-weight: 600;
    color: #374151;
}

/* ---- Teacher queue (task 5.3) ---- */
.ask-teacher {
    max-width: 1352px;
    margin: 0 auto;
    padding: 8px 0 24px;
}
/* Two panels like the questions tab: controls on the left, the queue on the right. */
.ask-teacher .ask-title {
    margin: 0 0 12px;
}
.ask-intro {
    margin: 0 0 12px;
    color: #374151;
}
.ask-teacher .ask-intro {
    margin: 0 0 16px;
    padding: 10px 12px;
    background: #f3f6fb;
    border-radius: 8px;
    font-size: 0.92em;
    line-height: 1.45;
    color: #4b5563;
}
.ask-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 12px;
}
.ask-teacher-side .ask-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}
.ask-teacher-side .ask-unread {
    font-size: 1.05em;
}
.ask-teacher-side .ask-filter {
    display: flex;
    justify-content: space-between;
}
.ask-teacher-side .ask-filter-select {
    flex: 1;
    max-width: 200px;
}
.ask-teacher-main .ask-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    margin: 0;
    border: 3px dashed #d0d0d0;
    border-radius: 12px;
    background: #fafafa;
    color: #555;
    font-size: 18px;
}
.ask-teacher-main .ask-item {
    background: #f8f9fa;
}
.ask-unread {
    margin: 0;
    font-weight: 700;
    color: #1f3b73;
}
.ask-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ask-filter-select {
    min-height: 36px;
    font: inherit;
}
.ask-tool,
.ask-action {
    min-height: 40px;
    padding: 0 14px;
    border: 2px solid #1f3b73;
    border-radius: 8px;
    background: #ffffff;
    color: #1f3b73;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.ask-action {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.9em;
}
.ask-tool[aria-pressed="true"] {
    background: #7a3e00;
    border-color: #7a3e00;
    color: #ffffff;
}
.ask-action--primary,
.ask-action[aria-pressed="true"] {
    background: #1f3b73;
    color: #ffffff;
}
.ask-action--danger {
    border-color: #b42318;
    color: #b42318;
}
.ask-tool:focus-visible,
.ask-action:focus-visible,
.ask-item-body:focus-visible {
    outline: 3px solid #1f3b73;
    outline-offset: 2px;
}
.ask-closed-note {
    font-weight: 700;
    color: #7a3e00;
}
.ask-tools-message--error {
    color: #8a1c12;
}
.ask-closed-note[hidden],
.ask-tools-message[hidden],
.ask-empty[hidden],
.ask-older[hidden] {
    display: none !important;
}
.ask-queue {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ask-item {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-left: 6px solid #1f3b73;
    border-radius: 10px;
    background: #ffffff;
}
.ask-item--answered {
    border-left-color: #2e7d32;
}
.ask-item--hidden,
.ask-item--archived {
    border-left-color: #6b7280;
    border-left-style: dotted;
    background: #f9fafb;
}
.ask-item-body {
    cursor: pointer;
    border-radius: 6px;
}
.ask-item-dot {
    display: inline-block;
    margin-bottom: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #1f3b73;
    color: #ffffff;
    font-size: 0.8em;
    font-weight: 700;
}
.ask-item-text {
    margin: 0 0 4px;
    font-size: 1.1em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.ask-item-meta {
    margin: 0;
    font-size: 0.85em;
    color: #4b5563;
}
.ask-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.ask-confirm {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    background: #eaf0fb;
}
.ask-older {
    margin-top: 10px;
}
.ask-privacy {
    margin: 0 0 12px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f3f4f6;
}
.ask-privacy-summary {
    cursor: pointer;
    font-weight: 600;
    min-height: 32px;
    line-height: 32px;
}
.ask-privacy-summary:focus-visible {
    outline: 3px solid #1f3b73;
    outline-offset: 2px;
}
.ask-privacy-list {
    margin: 4px 0 4px 1.2em;
    padding: 0;
}
.ask-privacy-list li {
    margin-bottom: 4px;
}
