/* =========================================================
   dumaguete.uk — housing.css
   Only the live listings block. Everything above it on the
   page is content.css, so the reading experience matches
   About, Weather, and the rest.
   ========================================================= */

.hs-section {
  padding-top: 4px;
  padding-bottom: 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.hs-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.hs-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hs-count {
  font-size: 0.8rem;
  color: var(--ink-faint);
  white-space: nowrap;
}
.hs-note {
  margin: 0 0 16px;
  max-width: 60ch;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Filters ---------- */
.hs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.hs-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 9px 13px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s var(--ease);
}
.hs-input:focus { border-color: var(--accent); }
.hs-input--sm { flex: 0 0 auto; }

/* ---------- Listing cards ---------- */
.hs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.hs-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px var(--shadow-a);
  transition: border-color 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.hs-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}
.hs-card__title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.hs-card__title:hover { color: var(--accent); text-decoration: none; }
.hs-card__rent {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.hs-card__per {
  margin-left: 5px;
  font-size: 0.76rem;
  color: var(--ink-faint);
}
.hs-card__wanted {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 9px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface-alt);
  border-radius: 999px;
}
.hs-card__body {
  margin: 9px 0 12px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.hs-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.hs-card__where {
  padding: 1px 8px;
  background: var(--surface-alt);
  border-radius: 999px;
}
.hs-card__who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.hs-card__who a {
  color: var(--ink-soft);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-card__who a:hover { color: var(--accent); text-decoration: none; }
.hs-card__bar {
  display: inline-block;
  flex: 0 0 auto;
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}
.hs-card__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.hs-card__tier {
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink-soft);
  white-space: nowrap;
}
.hs-card__tier--insider,
.hs-card__tier--legend {
  background: var(--accent);
  color: var(--accent-ink);
}
.hs-card__when { margin-left: auto; white-space: nowrap; }

/* ---------- Empty + more ---------- */
.hs-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 0;
  max-width: 56ch;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-faint);
}
.hs-more {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.hs-more:hover { color: var(--accent); background: var(--surface-alt); }

/* ---------- Narrow screens ---------- */
@media (max-width: 560px) {
  .hs-list { grid-template-columns: 1fr; }
  .hs-card__when { margin-left: 0; }
}

/* =========================================================
   Post buttons + in-place composer (same pattern as Jobs)
   ========================================================= */
.jobs-board__actions { display: flex; gap: 8px; margin-bottom: 14px; }
.jobs-post {
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink);
}
.jobs-post--hire { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.jobs-post--seek { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.jobs-post--hire:hover,
.jobs-post--seek:hover { border-color: var(--accent); color: var(--accent); }
.jobs-post:hover { filter: brightness(1.07); }

.jobs-modal { position: fixed; inset: 0; z-index: 400; }
.jobs-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.jobs-modal__panel {
  position: relative;
  margin: 6vh auto;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 88vh;
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
}
.jobs-modal__head { display: flex; align-items: center; margin-bottom: 8px; }
.jobs-modal__head h3 { margin: 0; font-family: var(--font-display); font-size: 1.1rem; }
.jobs-modal__x { margin-left: auto; border: 0; background: transparent; font-size: 1.5rem; line-height: 1; color: var(--ink-faint); cursor: pointer; }
.jobs-modal .cn-field { display: block; margin-bottom: 12px; }
.jobs-modal .cn-field__label { display: block; margin-bottom: 5px; font-size: 0.82rem; color: var(--ink-soft); }
.jobs-modal .cn-field__label em { font-style: normal; color: var(--accent); font-size: 0.76rem; }
.jobs-modal .cn-field__label small { color: var(--ink-faint); font-weight: 400; }
.jobs-modal .cn-field__input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.jobs-modal .cn-field__input:focus { outline: none; border-color: var(--accent); }
.jobs-modal textarea.cn-field__input { resize: vertical; }
.jobs-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jobs-modal__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.jobs-modal__actions .btn {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
}
.jobs-modal__actions .btn--primary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.jobs-modal__actions .btn--primary:hover { background: var(--surface-alt); filter: none; }
.jobs-modal__actions .btn--ghost:hover { background: var(--surface-alt); }
.jobs-modal__actions .btn:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 520px) { .jobs-modal__row { grid-template-columns: 1fr; } }

/* Photo uploader (shared pattern, from forum.css) */
.up { margin-top: 4px; }
.up__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.up__btn {
  padding: 7px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.up__btn:hover { color: var(--accent); background: var(--surface-alt); }
.up__hint {
  flex: 1 1 200px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--ink-faint);
}
.up__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.up__item {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}
.up__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up__item.is-working {
  display: flex;
  align-items: center;
  justify-content: center;
}
.up__spin {
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.up__x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.up__x:hover { background: rgba(0, 0, 0, 0.75); }
.up__size {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 5px;
  font-size: 0.75rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
}
.up__err {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--accent);
}


/* Photos on a housing card */
.hs-card__photos { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.hs-card__photo {
  width: 84px; height: 84px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  display: block;
}
.hs-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
