/*
 * Student-view-specific styling (U11). The base primitives (cards, pills,
 * link-button, inline-list, field-list) come from ../shared/style.css; this file
 * only adds what the student surface needs on top: the top bar, buttons, the
 * account select, and the my-repos list. Australian spelling in any text.
 */

/* Top bar with the signed-in email and a sign-out control. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--colour-surface);
  border-bottom: 1px solid var(--colour-border);
}

.topbar__brand {
  font-weight: 700;
}

.topbar__account {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.topbar__email {
  color: var(--colour-text-muted);
  font-size: 0.95rem;
}

/* Buttons. One base, three intents. */
.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--colour-accent);
  color: var(--colour-accent-contrast);
}

.btn--secondary {
  background: var(--colour-surface);
  border-color: var(--colour-accent);
  color: var(--colour-accent);
}

.btn--ghost {
  background: transparent;
  border-color: var(--colour-border);
  color: var(--colour-text);
}

.btn:hover:not(:disabled) {
  filter: brightness(0.96);
}

.actions {
  margin-top: var(--space-4);
}

.section__subheading {
  margin: var(--space-3) 0 var(--space-2);
  font-size: 1rem;
}

.select {
  width: 100%;
  max-width: 420px;
  padding: var(--space-2) var(--space-3);
  font-size: 1rem;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius);
  background: var(--colour-surface);
  color: inherit;
}

/* Notices: a soft inline message block for errors and status. */
.notice {
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.notice--error {
  background: var(--colour-unlinked-bg);
  color: var(--colour-unlinked-fg);
}

/* Context header naming the class/assignment the shared link targets. */
.context-header {
  margin: 0 0 var(--space-4);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--colour-text-muted);
}

/*
 * Provisioning-status pill states. Pending/provisioning read as in-progress
 * (neutral linked/amber colour); failed reuses the error tint. The success tint
 * for `pill--provisioned` comes from ../shared/style.css (green), so "ready"
 * stands apart from "still working" without overriding it here.
 */
.pill--pending,
.pill--provisioning {
  background: var(--colour-linked-bg);
  color: var(--colour-linked-fg);
}

.pill--failed {
  background: var(--colour-unlinked-bg);
  color: var(--colour-unlinked-fg);
}

/* Spacing for the post-provision invitation hint below the Open button. */
#job-invitation-note {
  margin-top: var(--space-3);
}

/* My-repos list: one row per repo with an Open link. */
.repo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.repo-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius);
}

.repo-list__name {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.signed-out {
  padding-top: var(--space-4);
}
