/* GradeNote (IDEA-124) — comment marker and the panel it opens. */

.grade-note {
    display: inline-flex;
}

.grade-note__trigger {
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
    padding: 0;
    border: 0;
    background: none;
    line-height: 1;
    color: var(--gray-700);
    cursor: pointer;
}

.grade-note__trigger:hover,
.grade-note__trigger[aria-expanded="true"] {
    color: var(--primary-dark);
}

.grade-note__trigger svg {
    width: 14px;
    height: 14px;
}

/* Fixed, because .table-responsive would clip a panel positioned in the cell.
   z-index matches the dropdown tier documented in app.css (sidebar 1000,
   dropdowns 1100, skip link 2000). */
.grade-note__panel {
    position: fixed;
    z-index: 1100;
    max-width: min(24rem, calc(100vw - 1.5rem));
    width: max-content;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.625rem 2rem 0.625rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    background: var(--white);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    color: var(--gray-900);
    font-size: 0.875rem;
    font-weight: 400;
    text-align: left;
    white-space: normal;
}

.grade-note__panel[hidden] {
    display: none;
}

.grade-note__close {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    display: inline-flex;
    padding: 0.125rem;
    border: 0;
    border-radius: 0.25rem;
    background: none;
    line-height: 1;
    color: var(--gray-700);
    cursor: pointer;
}

.grade-note__close:hover {
    background: var(--gray-100);
}

.grade-note__text {
    white-space: pre-wrap;
}
