/* Mentor Assignments page - styles from prototype mentor_dashboard_assignments.html */
/* Ensures visual alignment and harmonious appearance */
/* Flex chain: page fills viewport, grid grows to use available space (like prototype main-container) */

.ma-page-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    overflow: hidden;
}

.ma-page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-width: calc(100% - 16px);
    margin: 0 auto;
    padding: 8px;
    width: 100%;
}

.ma-page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.ma-page-header-row .page-title {
    flex-shrink: 0;
}

.ma-published-checklist {
    flex-shrink: 0;
    margin: 0;
    align-items: center;
}

.ma-published-checklist .form-check {
    margin-bottom: 0;
}

.ma-page-content > .page-title {
    flex-shrink: 0;
}

.ma-page-content > .ma-content-grid {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.ma-content-grid {
    display: grid;
    grid-template-columns: minmax(320px, 600px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 12px;
    min-height: 320px;
}

@media (max-width: 992px) {
    .ma-content-grid {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(200px, 1fr) minmax(200px, 1fr);
    }
}

.ma-section {
    background: #fff;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ma-section-students {
    overflow: hidden;
}

.ma-section-students .ma-students-toolbar {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.ma-section-students .ma-students-toolbar select,
.ma-filter-select {
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: var(--font-size-body);
    background: #fff;
    flex-shrink: 0;
    min-width: 120px;
}

.ma-section-students .ma-search-wrap {
    min-width: 0;
    width: 100%;
}

.ma-section-students .ma-search-wrap input,
.ma-search-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: var(--font-size-body);
}

.ma-section-students .ma-grid-scroll {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ma-students-grid .ma-id-cell {
    font-family: monospace;
    font-size: var(--font-size-secondary);
    color: #6c757d;
    text-align: right;
}

.ma-students-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #6c757d;
    font-size: var(--font-size-body-lg);
}

/* Assignments block - padding: 0 like prototype, inner has padding */
.ma-assignments-block {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #f8f9fa;
    border: 1px dashed var(--border-color, #dee2e6);
    border-radius: 6px;
}

.ma-assignments-block.has-content {
    background: #fff;
    border: 1px solid var(--border-color, #dee2e6);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ma-assignments-inner {
    flex: 1;
    min-height: 220px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    overflow-y: hidden;
}

.ma-assignments-hint {
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: var(--font-size-body);
    color: #495057;
    text-align: center;
    flex-shrink: 0;
}

/* Student cell in AG Grid: name bold, login gray, same line, no wrap */
.ma-students-grid .ma-student-cell {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ma-students-grid .ma-student-cell .student-name {
    font-weight: 600;
    color: #333;
    cursor: default;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.ma-students-grid .ma-student-cell .student-name:hover {
    color: var(--primary-color, #1446A0);
}

.ma-students-grid .ma-student-cell .login-sub {
    font-weight: 400;
    color: #868e96;
    font-size: var(--font-size-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.ma-assignments-scroll,
.ma-assignments-scroll-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ma-panel-card {
    flex-shrink: 0;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ma-panel-current {
    background: #fff;
    flex: 0 1 auto;
    max-height: 55%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ma-panel-add {
    flex: 1;
    flex-shrink: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fafbfc;
    border-color: #e2e5e9;
}

.ma-panel-add .assign-picker-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.ma-current-table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 4px;
    overflow: auto;
}

.ma-student-names-header {
    font-weight: 600;
    font-size: var(--font-size-body-lg);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Section title with blue left border */
.assign-section-title {
    font-size: var(--font-size-section-title);
    font-weight: 600;
    color: var(--text-primary, #19191A);
    margin: 0;
    height: 28px;
    min-height: 28px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 8px 0 12px;
    border-left: 3px solid var(--primary-color, #1446A0);
    background: #f0f3f7;
    border-radius: 0 4px 4px 0;
}

.ma-section-header-with-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    min-height: 28px;
    padding: 0 8px 0 12px;
    border-left: 3px solid var(--primary-color, #1446A0);
    background: #f0f3f7;
    border-radius: 0 4px 4px 0;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.ma-section-header-with-search .assign-section-title {
    flex-shrink: 0;
    margin: 0;
    height: auto;
    min-height: 0;
    border-left: none;
    background: transparent;
    padding: 0;
}

.ma-section-header-with-search .ma-picker-search {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: var(--font-size-body);
}

/* Assign list table - aligned columns */
.assign-list-table {
    width: 100%;
    min-width: 650px;
    font-size: var(--font-size-secondary);
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
}

.assign-list-table .assign-name-col {
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
}

.assign-list-table th,
.assign-list-table td {
    padding: 2px 5px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    line-height: 1.25;
}

.assign-list-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: var(--font-size-label);
    color: #495057;
}

.assign-list-table .action-cell {
    width: 24px;
    text-align: center;
    vertical-align: middle;
}

.assign-list-table .assign-id-cell {
    width: 40px;
    max-width: 40px;
    white-space: nowrap;
    color: #6c757d;
    font-size: var(--font-size-label);
    font-family: monospace;
    text-align: right;
}

.assign-list-table .type-cell {
    width: 80px;
    max-width: 80px;
    white-space: nowrap;
    color: #6c757d;
}

.assign-list-table .ma-line-col {
    width: 148px;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #495057;
    font-size: var(--font-size-label);
    cursor: default;
}

.assign-list-table .ma-line-col[title]:not([title=""]) {
    border-bottom: 1px dotted #adb5bd;
}

.assign-list-table .assign-student-col {
    width: 280px;
    color: #495057;
    font-size: var(--font-size-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assign-list-table .assign-name-col {
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
}

.assign-action-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    background: #fff;
    font-size: var(--font-size-label);
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-family: inherit;
}

.assign-action-btn:hover:not(:disabled) {
    background: var(--primary-color, #1446A0);
    color: #fff;
    border-color: var(--primary-color, #1446A0);
}

.assign-picker-item-add.assign-action-btn {
    flex-shrink: 0;
    order: -2;
    width: 24px;
    min-width: 24px;
    justify-content: center;
    color: var(--primary-color, #1446A0);
}

.assign-picker-item-add.assign-action-btn:hover:not(:disabled) {
    color: #fff;
}

.assign-picker-item-add.assign-action-btn.assign-picker-item-add-hidden {
    visibility: hidden;
}

.assign-row-remove.assign-action-btn {
    width: 24px;
    min-width: 24px;
    color: #dc3545;
}

.assign-row-remove.assign-action-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* Picker list - base: max-height for standalone use; ma-panel-add overrides to fill space */
.assign-picker-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
    margin-left: -1px;
}

.assign-picker-group {
    padding: 0;
}

.assign-picker-group-title {
    padding: 2px 8px;
    font-size: var(--font-size-small);
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    color: #6c757d;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.assign-picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    width: 100%;
    padding: 2px 5px;
    border: none;
    border-bottom: 1px solid #f1f3f4;
    background: #fff;
    font-size: var(--font-size-secondary);
    line-height: 1.25;
    color: #333;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}

.assign-picker-item:hover {
    background: #e7f3ff;
}

.assign-picker-item:last-child {
    border-bottom: none;
}

.assign-picker-item-add {
    flex-shrink: 0;
    order: -2;
    width: 24px;
    min-width: 24px;
    justify-content: flex-start;
}

.assign-picker-item-id {
    font-size: var(--font-size-small);
    color: #6c757d;
    font-family: monospace;
    flex-shrink: 0;
    width: 28px;
    text-align: right;
    order: -1;
}

.assign-picker-item-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    order: 0;
}

.assign-status-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    order: 1;
    background-color: #adb5bd;
}

.assign-status-dot.assign-status-published {
    background-color: #198754;
}

.assign-status-dot.assign-status-draft {
    background-color: #fd7e14;
}

.assign-status-dot.assign-status-archived {
    background-color: #adb5bd;
}

