/* =========================================================================
   MM Recruitment - Employer Portal recruitment management additions.
   Layered on tokens.css, portal.css and los-recruitment.css (whose
   light-theme cards, tabs, tables, badges and buttons are reused here
   so the employer portal reads as the same product as the staff
   dashboard). This file only adds the pipeline board, the interview
   agenda, status colours and employer-specific layout tweaks.
   ========================================================================= */

/* The employer tab bar sits inside the dashboard card flow, not at the
   top of the page, so it is not sticky here. */
.employer-tab-nav { position: static; margin: 0 0 18px; border-radius: var(--radius); border: 1px solid var(--hairline); }
.employer-tab-nav .los-tab-nav-inner { padding: 8px 10px; }
.employer-panel { min-width: 0; }
.employer-panel > .los-panel { margin-top: 0; }
.employer-panel-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.employer-panel-header-row > div { flex: 1 1 320px; }

/* Eight summary cards: 2 / 4 / 4 columns. */
.employer-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .employer-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .employer-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Vacancy status colours */
.employer-status-draft { background: var(--light); color: var(--text-muted); }
.employer-status-submitted { background: rgba(177, 138, 67, 0.18); color: var(--gold-dark); }
.employer-status-open { background: rgba(45, 138, 86, 0.16); color: #1f6b41; }
.employer-status-on_hold { background: rgba(201, 142, 44, 0.2); color: #8a5a1a; }
.employer-status-filled { background: rgba(58, 122, 189, 0.14); color: #2c5f93; }
.employer-status-closed { background: rgba(38, 35, 31, 0.08); color: var(--text-muted); }

/* Pipeline stage colours (board columns, badges) */
.employer-stage-badge-new { background: rgba(177, 138, 67, 0.18); color: var(--gold-dark); }
.employer-stage-badge-screening { background: rgba(58, 122, 189, 0.14); color: #2c5f93; }
.employer-stage-badge-shortlisted { background: rgba(102, 86, 184, 0.14); color: #4c3f9a; }
.employer-stage-badge-interview { background: rgba(201, 142, 44, 0.2); color: #8a5a1a; }
.employer-stage-badge-offer { background: rgba(45, 138, 86, 0.16); color: #1f6b41; }
.employer-stage-badge-hired { background: #1f6b41; color: var(--white); }
.employer-stage-badge-rejected { background: rgba(163, 49, 44, 0.12); color: #a3312c; }
.employer-stage-badge-withdrawn { background: var(--light); color: var(--text-muted); }

/* Interview status colours */
.employer-interview-proposed, .employer-interview-rescheduled, .employer-interview-requested { background: rgba(177, 138, 67, 0.18); color: var(--gold-dark); }
.employer-interview-scheduled, .employer-interview-confirmed { background: rgba(45, 138, 86, 0.16); color: #1f6b41; }
.employer-interview-completed { background: rgba(58, 122, 189, 0.14); color: #2c5f93; }
.employer-interview-cancelled { background: rgba(163, 49, 44, 0.12); color: #a3312c; }

/* -------------------------------------------------------------------
   Pipeline board - horizontal columns on desktop, stacked on phones.
   ------------------------------------------------------------------- */
.employer-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.employer-board[hidden] { display: none; }
.employer-board-column {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 3px solid var(--gold);
}
.employer-board-column.employer-stage-hired { border-top-color: #1f6b41; }
.employer-board-column.employer-stage-rejected { border-top-color: #a3312c; }
.employer-board-column.employer-stage-withdrawn { border-top-color: rgba(38, 35, 31, 0.3); }
.employer-board-column h3 {
  margin: 0 0 4px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.employer-board-card {
  background: var(--ivory);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.employer-board-card:hover, .employer-board-card:focus-visible { border-color: var(--gold); transform: translateY(-1px); outline: none; }
.employer-board-card strong { display: block; color: var(--charcoal); font-size: 0.92rem; }
.employer-board-empty { color: var(--text-muted); text-align: center; margin: 12px 0; }
@media (max-width: 720px) {
  .employer-board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow-x: visible; }
}

/* -------------------------------------------------------------------
   Interview agenda (calendar-style, grouped by day)
   ------------------------------------------------------------------- */
.employer-calendar { display: flex; flex-direction: column; gap: 16px; }
.employer-calendar-day {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.employer-calendar-day h3 { font-family: var(--font-body); font-size: 0.9rem; font-weight: 700; color: var(--gold-dark); margin: 0 0 10px; }
.employer-calendar-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  cursor: pointer;
}
.employer-calendar-item:first-of-type { border-top: 0; }
.employer-calendar-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.employer-calendar-time { font-family: var(--font-display); font-size: 1.1rem; color: var(--charcoal); }
.employer-calendar-body { min-width: 0; }
.employer-calendar-body strong { color: var(--charcoal); }
@media (max-width: 560px) {
  .employer-calendar-item { grid-template-columns: 56px minmax(0, 1fr); }
  .employer-calendar-item .los-stage-badge { grid-column: 2; justify-self: start; }
}

/* Modal forms inside the light modals */
.portal-modal h4 { font-family: var(--font-body); font-size: 0.95rem; margin: 12px 0 8px; color: var(--charcoal); }
.portal-modal .button.destructive { padding: 10px 18px; }
#employer-stage-actions .button { padding: 8px 14px; font-size: 0.84rem; }
#employer-stage-actions .button:disabled { opacity: 1; cursor: default; }

/* Employer header spacing on the dashboard page */
.portal-dashboard-header { margin-bottom: 18px; }

/* The [hidden] attribute must beat .button's display:inline-flex and
   the board/list display rules, or hidden controls stay visible. */
.button[hidden], .employer-panel[hidden], .los-enquiry-table-wrap[hidden] { display: none !important; }
/* Panels receive programmatic focus on tab change (ScrollFocus) - no
   browser focus ring on a non-interactive container. */
.employer-panel:focus { outline: none; }
