/*
 * Quick Submit – editorial dashboard.
 *
 * One list of manuscripts; the number of days each has waited is the one
 * strong element (its bar turns amber after a week, red after three).
 * Colours follow the VYBE Journal Theme Kit when it is active (--vj-*);
 * override --ed-* to restyle. Layout follows the width of the content area.
 */
.qsub-ed {
	--ed-ink: var(--vj-ink, #1c2430);
	--ed-muted: var(--vj-muted, #5b6474);
	--ed-line: var(--vj-line, #dde2ea);
	--ed-mist: var(--vj-mist, #f3f5f8);
	--ed-paper: var(--vj-paper, #ffffff);
	--ed-accent: var(--vj-navy, #1b3a5c);
	--ed-accent-deep: var(--vj-navy-deep, #122a45);
	--ed-calm: #c4ccd8;
	--ed-warm: #b26b00;
	--ed-late: #b42318;
	--ed-ok: #1a7f37;
	--ed-wa: #0b7a4b;
	container-type: inline-size;
	color: var(--ed-ink);
	font-size: 1rem;
	line-height: 1.5;
}
.qsub-ed *, .qsub-ed *::before, .qsub-ed *::after { box-sizing: border-box; }
.qsub-ed .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tabs and language */
.qsub-ed-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--ed-line); }
.qsub-ed-tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.qsub-ed-tab { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 0 9px; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--ed-muted); text-decoration: none; font-weight: 600; }
.qsub-ed-tab:hover, .qsub-ed-tab:focus-visible { color: var(--ed-ink); }
.qsub-ed-tab.is-current { color: var(--ed-ink); border-bottom-color: var(--ed-accent); }
.qsub-ed-tab__n { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9em; color: var(--ed-accent); }
.qsub-ed-lang { display: inline-flex; margin-bottom: 8px; border: 1px solid var(--ed-line); border-radius: 6px; overflow: hidden; }
.qsub-ed-lang button { padding: 4px 12px; border: 0; background: var(--ed-paper); color: var(--ed-muted); font: inherit; font-size: .85rem; cursor: pointer; }
.qsub-ed-lang button + button { border-left: 1px solid var(--ed-line); }
.qsub-ed-lang button[aria-pressed="true"] { background: var(--ed-accent); color: #fff; }

/* Search */
.qsub-ed-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 6px; }
.qsub-ed-search input[type="search"] { flex: 1 1 260px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--ed-line); border-radius: 6px; font: inherit; background: var(--ed-paper); color: var(--ed-ink); }
.qsub-ed-link { color: var(--ed-accent); }

/* Buttons */
.qsub-ed-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 14px; border: 1px solid var(--ed-line); border-radius: 6px; background: var(--ed-paper); color: var(--ed-ink); font: inherit; font-size: .92rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; }
.qsub-ed .qsub-ed-btn:is(:hover, :focus) { border-color: var(--ed-accent); color: var(--ed-accent); background: var(--ed-paper); text-decoration: none; }
.qsub-ed .qsub-ed-btn--main { background: var(--ed-accent); border-color: var(--ed-accent); color: #fff; }
.qsub-ed .qsub-ed-btn--main:is(:hover, :focus) { background: var(--ed-accent-deep); border-color: var(--ed-accent-deep); color: #fff; }
.qsub-ed .qsub-ed-btn--quiet { border-color: transparent; background: transparent; color: var(--ed-muted); }
.qsub-ed .qsub-ed-btn--quiet:is(:hover, :focus) { border-color: var(--ed-line); color: var(--ed-ink); }
.qsub-ed .qsub-ed-btn--wa { color: var(--ed-wa); border-color: #b9dccb; }
.qsub-ed .qsub-ed-btn--wa:is(:hover, :focus) { color: var(--ed-wa); border-color: var(--ed-wa); }
.qsub-ed .qsub-ed-btn--stop { background: var(--ed-late); border-color: var(--ed-late); }
.qsub-ed .qsub-ed-btn--stop:is(:hover, :focus) { background: #8f1c13; border-color: #8f1c13; }
.qsub-ed-btn:disabled { opacity: .55; cursor: progress; }
.qsub-ed :focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 2px; }

/* The list */
.qsub-ed-list { list-style: none; margin: 8px 0 0; padding: 0; }
.qsub-ed-row {
	display: grid;
	grid-template-columns: 4.6rem minmax(0, 1fr);
	grid-template-areas: "age main" "age actions" "panel panel";
	column-gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--ed-line);
}
.qsub-ed-age { grid-area: age; align-self: start; padding-left: 12px; border-left: 4px solid var(--ed-calm); line-height: 1.1; }
.qsub-ed-row.is-warm .qsub-ed-age { border-left-color: var(--ed-warm); }
.qsub-ed-row.is-late .qsub-ed-age { border-left-color: var(--ed-late); }
.qsub-ed-age strong { display: block; font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.qsub-ed-row.is-warm .qsub-ed-age strong { color: var(--ed-warm); }
.qsub-ed-row.is-late .qsub-ed-age strong { color: var(--ed-late); }
.qsub-ed-age span { display: block; margin-top: 2px; font-size: .75rem; color: var(--ed-muted); }
.qsub-ed-main { grid-area: main; min-width: 0; }
.qsub-ed-title { margin: 0; font-size: 1.08rem; line-height: 1.35; font-weight: 600; }
.qsub-ed-title__btn { display: inline; padding: 0; border: 0; background: none; color: var(--ed-ink); font: inherit; text-align: left; cursor: pointer; }
.qsub-ed .qsub-ed-title__btn:is(:hover, :focus) { color: var(--ed-accent); text-decoration: underline; text-underline-offset: 3px; background: none; }
.qsub-ed-title2 { margin: 2px 0 0; color: var(--ed-muted); font-size: .95rem; }
.qsub-ed-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; font-size: .88rem; color: var(--ed-muted); }
.qsub-ed-code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ed-ink); }
.qsub-ed-who { color: var(--ed-ink); }
.qsub-ed-tag { padding: 0 8px; border-radius: 3px; background: var(--ed-mist); color: var(--ed-ink); font-size: .82rem; }
.qsub-ed-tag--revision { background: #fdf1dc; color: #7a4a00; }
.qsub-ed-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.qsub-ed-row.is-settled .qsub-ed-main { opacity: .7; }
.qsub-ed-panel { grid-area: panel; margin-top: 14px; }
.qsub-ed-panel[hidden] { display: none; }

/* Wide content area: buttons beside the text */
@container (min-width: 760px) {
	.qsub-ed-row { grid-template-columns: 4.6rem minmax(0, 1fr) auto; grid-template-areas: "age main actions" "panel panel panel"; }
	.qsub-ed-actions { margin-top: 0; justify-content: flex-end; align-self: start; max-width: 25rem; }
}

/* Panels */
.qsub-ed-box, .qsub-ed-details { padding: 14px 16px; border: 1px solid var(--ed-line); border-radius: 10px; background: var(--ed-mist); }
.qsub-ed-label { display: block; margin-bottom: 4px; font-weight: 600; font-size: .9rem; }
.qsub-ed-box textarea, .qsub-ed-box select, .qsub-ed-box input[type="text"], .qsub-ed-box input[type="date"] { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--ed-line); border-radius: 6px; background: var(--ed-paper); color: var(--ed-ink); font: inherit; }
.qsub-ed-box textarea { min-height: 7em; }
.qsub-ed-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: .92rem; }
.qsub-ed-check input { margin-top: .3em; }
.qsub-ed-box__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.qsub-ed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 16px; }
.qsub-ed-grid p { margin: 0 0 10px; }
.qsub-ed-note { margin: 4px 0 8px; padding: 8px 12px; border-left: 3px solid var(--ed-warm); background: var(--ed-paper); font-size: .9rem; }
.qsub-ed-note[hidden], .qsub-ed-steps[hidden], .qsub-ed-error[hidden] { display: none; }
.qsub-ed-error { margin: 10px 0 0; color: var(--ed-late); font-weight: 600; }
.qsub-ed-muted { color: var(--ed-muted); }
.qsub-ed-result { margin: 0; }
.qsub-ed-result .qsub-ed-btn { margin-left: 6px; }

/* Quick publish steps: a real sequence, so numbered */
.qsub-ed-steps { margin: 16px 0 0; padding: 0 0 0 1.6em; font-size: .93rem; }
.qsub-ed-steps li { margin: 6px 0; padding-left: 4px; color: var(--ed-muted); }
.qsub-ed-steps li::marker { font-variant-numeric: tabular-nums; font-weight: 700; }
.qsub-ed-step__msg { display: block; font-size: .86rem; }
.qsub-ed-steps .is-working { color: var(--ed-ink); }
.qsub-ed-steps .is-working .qsub-ed-step__name::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 8px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: qsub-ed-spin .8s linear infinite; }
.qsub-ed-steps .is-done { color: var(--ed-ok); }
.qsub-ed-steps .is-done .qsub-ed-step__name::before { content: "✓ "; }
.qsub-ed-steps .is-skipped { color: var(--ed-muted); }
.qsub-ed-steps .is-warning { color: var(--ed-warm); }
.qsub-ed-steps .is-failed { color: var(--ed-late); font-weight: 600; }
.qsub-ed-steps .is-done .qsub-ed-step__msg, .qsub-ed-steps .is-skipped .qsub-ed-step__msg { color: var(--ed-muted); }
.qsub-ed-qp-end { margin-top: 12px; }
@keyframes qsub-ed-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qsub-ed-steps .is-working .qsub-ed-step__name::after { animation: none; } }

/* Details */
.qsub-ed-details { background: var(--ed-paper); }
.qsub-ed-details section + section { margin-top: 12px; }
.qsub-ed-details h4 { margin: 0 0 4px; font-size: .9rem; color: var(--ed-muted); font-weight: 600; }
.qsub-ed-details p { margin: 0; max-width: 46em; }
.qsub-ed-authors, .qsub-ed-files { margin: 0; padding: 0; list-style: none; }
.qsub-ed-authors li + li, .qsub-ed-files li + li { margin-top: 6px; }
.qsub-ed-dates { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0; }
.qsub-ed-dates dt { color: var(--ed-muted); }
.qsub-ed-dates dd { margin: 0; font-variant-numeric: tabular-nums; }
.qsub-ed-links { margin-top: 12px !important; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.qsub-ed-details a, .qsub-ed-links a { color: var(--ed-accent); }

.qsub-ed-empty { margin: 28px 0; padding: 18px 20px; border: 1px dashed var(--ed-line); border-radius: 10px; color: var(--ed-muted); }
.qsub-ed-pages { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 0 0; color: var(--ed-muted); }
.qsub-ed--gate { max-width: 30rem; }
.qsub-ed-gate-title { margin-top: 0; }
.qsub-ed--gate input[type="text"], .qsub-ed--gate input[type="password"] { width: 100%; min-height: 40px; padding: 6px 10px; }
