/**
 * PressPrimer Assignment - Admin Styles
 *
 * Styles for WordPress admin list tables and pages.
 *
 * @package PressPrimer_Assignment
 * @since 1.0.0
 */

/* Assignments list table: constrain ID column width */
.column-id {
	width: 6em;
}

/*
 * Submissions list and grading queue column widths.
 *
 * Both tables share `plural = submissions` and therefore the same
 * .wp-list-table.submissions class, so one set of rules sizes both.
 * Widths are in em so each column tracks the admin font size and
 * roughly matches the character count it's meant to display:
 *   ID         6em  — 6 digits plus the sort indicator
 *   Student   20em  — ~25 characters; covers "Submission #N" and most
 *                     student display names
 *   Assignment 30em  — ~40 characters of assignment title
 *   Status     8em  — longest label ("Submitted", "Returned") plus a
 *                     little breathing room
 *   Files      5em  — short counts like "3 files"
 *   Score      7em  — values like "85.5 / 100"
 *   Submitted 14em  — date strings without wrapping
 *
 * Files and Score only appear on the Submissions list — the grading
 * queue's column set doesn't include them, so the rules below are
 * harmless there.
 *
 * WordPress's `widefat fixed` class applies table-layout: fixed, which
 * honors column widths exactly and overflows horizontally instead of
 * shrinking when the container is narrower than the sum. Override to
 * `auto` so column widths become preferred sizes the browser can
 * compress proportionally; the min-widths below set the floor so
 * shrinkage stops before content becomes unreadable.
 */
.wp-list-table.submissions {
	table-layout: auto;
}

.wp-list-table.submissions .column-id {
	width: 6em;
	min-width: 4em;
}

.wp-list-table.submissions .column-student {
	width: 20em;
	min-width: 12em;
}

.wp-list-table.submissions .column-assignment {
	width: 30em;
	min-width: 14em;
}

.wp-list-table.submissions .column-status {
	width: 8em;
	min-width: 6em;
}

.wp-list-table.submissions .column-files {
	width: 5em;
	min-width: 4em;
}

.wp-list-table.submissions .column-score {
	width: 7em;
	min-width: 5em;
}

.wp-list-table.submissions .column-submitted_at {
	width: 14em;
	min-width: 10em;
}

/* Utility: hide element */
.ppa-hidden {
	display: none;
}

/* Integration meta box description spacing */
.ppa-meta-box-description {
	margin-top: 10px;
}
