/* Job Portal styles — mirrors the look of the Viper PublicPortal.tsx preview:
   white header with a primary-color bottom border, a light gray page, and
   centered "paper" cards in a max-48rem column. */

:root {
  --primary: #0066cc;
  --bg: #fafafa;
  --paper: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --border: #e0e0e0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header --- */
.portal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border-bottom: 2px solid var(--primary);
}
.portal-header__brand { display: flex; align-items: center; gap: 1rem; }
.portal-header__logo { height: 3rem; width: auto; object-fit: contain; }
.portal-header__titles { display: flex; flex-direction: column; gap: 0.25rem; }
.portal-header__name { margin: 0; font-size: 1.5rem; font-weight: 700; }
.portal-header__name a { color: var(--text); }
.portal-header__name a:hover { text-decoration: none; }
.portal-header__sub { margin: 0; color: var(--muted); font-size: 0.875rem; }

.custom-html { background: #f5f5f5; padding: 1.5rem; }
.custom-html :first-child { margin-top: 0; }
.custom-html :last-child { margin-bottom: 0; }

/* --- Layout --- */
.container {
  max-width: 48rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-intro { text-align: center; display: flex; flex-direction: column; gap: 0.5rem; }
.page-intro h2 { margin: 0; font-size: 1.75rem; }

.muted { color: var(--muted); }

/* --- Paper / cards --- */
.paper {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.paper--empty {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
}
.paper--empty h2 { margin: 0; }

.job-list { display: flex; flex-direction: column; gap: 1rem; }
.job-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text);
  transition: box-shadow 0.15s ease;
}
.job-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); text-decoration: none; }
.job-card__title { margin: 0; font-size: 1.25rem; }

/* --- Chips --- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
}
.chip--solid { background: var(--border); }
.chip--outline { border: 1px solid #ccc; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 0.375rem;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn--small { padding: 0.4rem 0.75rem; font-size: 0.85rem; }
.btn--primary { background: var(--primary); color: #fff; align-self: flex-start; }
.btn--outline { background: #fff; color: var(--text); border: 1px solid #ccc; }

.back-link { align-self: flex-start; }

/* --- Job detail --- */
.job-detail { display: flex; flex-direction: column; gap: 0.75rem; }
.job-detail h2 { margin: 0; }
.job-detail__salary { margin: 0; font-weight: 600; }
.job-detail__desc { white-space: pre-wrap; margin: 0.5rem 0; }
.quals { margin: 0; padding-left: 1.25rem; }

/* --- Forms --- */
form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field > label { font-weight: 600; font-size: 0.9rem; }
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent);
}
textarea { resize: vertical; }

/* File input: frame it like the other inputs and turn the native picker into
   an on-brand button (matches .btn--outline, hovers to the tenant primary). */
input[type="file"] {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 0.375rem;
  background: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 0.375rem;
  background: #fff;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
input[type="file"]:hover::file-selector-button,
input[type="file"]::file-selector-button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.checks { display: flex; flex-direction: column; gap: 0.4rem; }
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; cursor: pointer; }
.check input { width: auto; }

.eeoc-heading { font-weight: 600; margin: 0.5rem 0 0; }

.form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* --- Alerts --- */
.alert { border-radius: 0.375rem; padding: 0.75rem 1rem; }
.alert--error {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #842029;
}
.alert ul { margin: 0; padding-left: 1.25rem; }

/* --- Success --- */
.success-check {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Footer --- */
.portal-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
}
.portal-footer p { margin: 0; }
