/* Gallus Homes — photo upload app styles
   Palette taken from https://www.gallusconst.com/proto */

:root {
  --g-warm: #1a1a1a;
  --g-warm-hover: #333333;
  --g-accent: #c4a265;
  --g-muted: rgba(0,0,0,0.5);
  --g-border: rgba(0,0,0,0.1);
  --g-bg: #fafafa;
  --g-tile-bg: #f1f1f0;
}

html, body {
  background: var(--g-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--g-warm);
}

.gallus-nav {
  background: #fff;
  border-bottom: 1px solid var(--g-border);
}
.gallus-brand { text-decoration: none; line-height: 1.05; }
.gallus-brand .brand-mark {
  color: var(--g-warm);
  font-weight: 700;
  letter-spacing: .02em;
  font-size: 1.05rem;
  text-transform: uppercase;
}
.gallus-brand .brand-sub {
  color: var(--g-muted);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gallus-link { color: var(--g-warm); text-decoration: none; }
.gallus-link:hover { color: var(--g-warm-hover); text-decoration: underline; }

.btn-warm {
  background: var(--g-warm);
  color: #fff;
  border: 0;
  font-weight: 500;
  letter-spacing: .02em;
  padding: .65rem 1.1rem;
}
.btn-warm:hover { background: var(--g-warm-hover); color: #fff; }
.btn-warm:disabled { opacity: .55; }

.btn-ghost {
  background: transparent;
  color: var(--g-warm);
  border: 1px solid var(--g-border);
}
.btn-ghost:hover { background: #f1f1f0; color: var(--g-warm); }

.form-label { font-weight: 500; font-size: .92rem; letter-spacing: .02em; }
.form-control, .form-select {
  border-color: var(--g-border);
  padding: .65rem .75rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--g-warm);
  box-shadow: 0 0 0 .15rem rgba(26,26,26,.12);
}

.required-dot::after {
  content: " •";
  color: var(--g-accent);
}

.gallus-card {
  background: #fff;
  border: 1px solid var(--g-border);
  border-radius: 10px;
  padding: 1.25rem;
}

.gallus-foot { background: #fff; border-top: 1px solid var(--g-border); }

/* Large "pick photos" zone */
.pick-zone {
  background: #fff;
  border: 2px dashed var(--g-border);
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pick-zone:hover, .pick-zone.is-drag {
  border-color: var(--g-warm);
  background: #fafafa;
}
.pick-zone i { font-size: 2.2rem; color: var(--g-warm); }
.pick-zone .pick-hint { color: var(--g-muted); font-size: .9rem; }

.pick-actions .btn { min-width: 7.5rem; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: .5rem;
  margin-top: 1rem;
}
.thumb {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--g-tile-bg);
  border-radius: 8px;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .x {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  border: 0; display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.thumb .sz {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff; font-size: .7rem; padding: 6px 6px 3px; text-align: right;
}

.hero-title { font-weight: 700; letter-spacing: -.01em; }
.hero-sub   { color: var(--g-muted); }

/* Gallery view ---------------------------------------------------------- */
.gallery-grid {
  margin-top: .5rem;
}
.gallery-tile {
  display: block;
  aspect-ratio: 1/1;
  background: var(--g-tile-bg);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.gallery-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
}
.gallery-tile img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}

.batch-card .batch-delete {
  color: var(--g-muted);
  border-color: var(--g-border);
  background: transparent;
  padding: .25rem .55rem;
}
.batch-card .batch-delete:hover {
  color: #b00;
  border-color: #b00;
  background: rgba(176,0,0,.04);
}

.note-block {
  background: #fafafa;
  border-left: 3px solid var(--g-accent);
  border-radius: 4px;
  white-space: pre-wrap;
}

/* Submit bar sticks to bottom on mobile */
.submit-bar {
  position: sticky; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--g-border);
  padding: .75rem;
  margin: 1.5rem -.75rem -1rem;
}
@media (min-width: 576px) {
  .submit-bar { position: static; margin: 1.5rem 0 0; border-top: 0; padding: 0; background: transparent; }
}

/* Job-mode switcher: active tab uses .btn-warm (filled), inactive uses .btn-ghost. */
.job-mode-tabs .job-mode-tab { transition: background-color .15s ease, color .15s ease; }
.job-mode-tabs .job-mode-tab:disabled { opacity: .5; cursor: not-allowed; }

/* Pinned bottom tab bar (PWA nav) */
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.gallus-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around; align-items: stretch;
  background: #fff; border-top: 1px solid #e9e6df;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 1030;
}
.gallus-tab {
  flex: 1 1 0; min-width: 0; text-align: center; padding: 6px 2px;
  color: #6b6b6b; text-decoration: none; font-size: 11px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border-radius: 0; transition: color .15s ease;
}
.gallus-tab i { font-size: 20px; line-height: 1; }
.gallus-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* Very narrow phones (<340px) — hide labels, keep icons */
@media (max-width: 339px) {
  .gallus-tab span { display: none; }
  .gallus-tab i { font-size: 22px; }
}
.gallus-tab:hover, .gallus-tab:focus { color: #1a1a1a; text-decoration: none; }
.gallus-tab.is-active { color: #c4a265; }
.gallus-tab.is-active i { color: #c4a265; }
