/* Saman POS — the careers page at www.samanpos.com/jobs
 *
 * Layered on pricing.css, which supplies the light theme's colours,
 * top bar, buttons and page head. Only the form lives here.
 *
 * No transitions or animations, same hard rule as the rest of the site.
 */

.jobs-page { max-width: 920px; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.6rem);
  margin-bottom: 1.2rem;
}

.panel h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; }

.panel-head {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.step {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tint);
  color: var(--brand);
  font-weight: 800;
  font-size: .95rem;
}

.hint { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }

.btn-sm { padding: .42rem .8rem; font-size: .9rem; }

/* ---------------------------------------------------------------- */
/* Jobs                                                             */

.city-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}

.chip {
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.status-line { margin: 0; color: var(--muted); }

.job-list { display: grid; gap: .75rem; }

.job {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .2rem .85rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.job:hover { border-color: #c7cdf5; }
.job.is-selected { border-color: var(--brand); background: #f7f8ff; }
.job.is-blocked { cursor: not-allowed; opacity: .55; }
.job.is-blocked:hover { border-color: var(--line); }

.job input[type="checkbox"] {
  grid-row: 1 / span 3;
  width: 20px; height: 20px;
  margin: .15rem 0 0;
  accent-color: var(--brand);
}

.job-title { font-weight: 700; font-size: 1.05rem; }

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;
  color: var(--muted);
  font-size: .88rem;
}

.city-tag {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: var(--brand-deep);
  font-weight: 600;
}

.job-desc {
  margin: .35rem 0 0;
  color: var(--ink-soft);
  font-size: .95rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.city-note {
  margin: .9rem 0 0;
  padding: .6rem .85rem;
  border-radius: 10px;
  background: #fff7e6;
  color: #8a5a00;
  font-size: .9rem;
}

/* ---------------------------------------------------------------- */
/* Fields                                                           */

.personal {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.3rem;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}

.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field-wide { grid-column: 1 / -1; }

.field label, .field legend {
  font-size: .88rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.unit { font-weight: 400; color: var(--muted); }

input, textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  width: 100%;
  min-width: 0;
  padding: .6rem .75rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #dc2626; }

.field-error { color: #dc2626; font-size: .84rem; min-height: 0; }
.field-error:empty { display: none; }

/* Photo */

.photo-field { display: flex; flex-direction: column; align-items: center; gap: .55rem; }

.photo-box {
  width: 150px; height: 170px;
  border: 1.5px dashed #c7cdf5;
  border-radius: var(--radius-sm);
  background: #fafbff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.photo-box.has-photo { border-style: solid; border-color: var(--line); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }

.photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}

/* Working hours */

.hours {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.hours legend { width: 100%; margin-bottom: .4rem; }

.choice {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--brand); background: #f7f8ff; color: var(--brand-deep); }
.choice input { width: auto; margin: 0; accent-color: var(--brand); }
.hours .field-error { width: 100%; }

/* ---------------------------------------------------------------- */
/* Family                                                           */

.family-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr .55fr 1.1fr 1fr 34px;
  gap: .5rem;
  align-items: center;
  margin-bottom: .5rem;
}

.family-headings {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .35rem;
}

.family-row label { display: block; min-width: 0; }
.cell-label { display: none; }

.remove-row {
  width: 34px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.remove-row:hover { border-color: #dc2626; color: #dc2626; }

.add-row { margin-top: .25rem; }

/* ---------------------------------------------------------------- */
/* Submit and done                                                  */

.submit-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .7rem;
  margin-top: .5rem;
}

.form-error {
  margin: 0;
  width: 100%;
  padding: .7rem .9rem;
  border-radius: 10px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
}

.btn[disabled] { opacity: .6; cursor: progress; }

.done { text-align: center; padding: 2.2rem 1.4rem; }
.done h2 { font-size: 1.5rem; color: var(--ok); margin-bottom: .5rem; }
.done p { margin: .4rem 0; color: var(--ink-soft); }
.done-jobs { list-style: none; padding: 0; margin: .8rem 0; font-weight: 700; }
.done-jobs li { margin: .2rem 0; }
.done .btn { margin-top: 1rem; }

/* ---------------------------------------------------------------- */
/* Phones                                                           */

@media (max-width: 720px) {
  .hide-sm { display: none; }

  .personal { grid-template-columns: minmax(0, 1fr); }
  .fields { grid-template-columns: minmax(0, 1fr); }

  /* Each family member becomes its own small card. */
  .family-headings { display: none; }
  .family-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: .7rem;
  }
  .family-row label:first-child { grid-column: 1 / -1; }
  .cell-label { display: block; font-size: .8rem; font-weight: 650; color: var(--muted); margin-bottom: .2rem; }
  .family-row > span[role="cell"] { grid-column: 1 / -1; }
  .remove-row { width: 100%; height: auto; padding: .45rem; }
  .remove-row::after { content: " Remove"; }

  .submit-bar { align-items: stretch; }
}
