/* 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; }

/* Content tab: alternating card backgrounds */
.gallus-card.content-card { background: #dee2e6; }
.gallus-card.content-card.content-card--alt { background: #dee2e6; }

/* --- Forward-carry flow (upload -> content -> publish) -------------------- */

/* Flash banners bounce in. Shared so Content/Upload get the same feedback as
   Publish (this rule used to live only in publish.php's inline <style>). */
@keyframes nectar-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
.alert-success, .alert-danger { animation: nectar-pop .35s ease-out; }

/* The item you just uploaded, pulled to the top of Content and ringed so it's
   obvious which card the hand-off landed on. */
.gallus-card.content-card--spot {
  box-shadow: 0 0 0 2px var(--g-accent);
  animation: nectar-pop .35s ease-out;
}
/* Same idea on the Publish list when arriving from Content. */
.publish-row.publish-row--spot {
  box-shadow: inset 0 0 0 2px var(--g-accent);
}

/* --- Progress strip (#856 item 4) ------------------------------------------
   1 Upload - 2 Details - 3 Publish. Steps are links, not just indicators. */
.nectar-steps { background: var(--g-tile-bg); border-bottom: 1px solid var(--g-border); }
.nectar-steps ol {
  display: flex; align-items: center; gap: 4px;
  max-width: 640px; margin: 0 auto; padding: 8px 12px; list-style: none;
}
.nectar-steps li { flex: 1 1 0; min-width: 0; }
.nectar-steps a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; color: var(--g-muted); font-size: .8rem;
  padding: 4px 2px; border-radius: 6px; white-space: nowrap;
}
.nectar-steps .n {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 600;
  border: 1px solid currentColor; line-height: 1;
}
/* the step you are on */
.nectar-steps .is-now a { color: var(--g-warm); font-weight: 600; }
.nectar-steps .is-now .n { background: var(--g-warm); border-color: var(--g-warm); color: #fff; }
/* steps already behind you */
.nectar-steps .is-done a { color: var(--g-accent); }
.nectar-steps .is-done .n { background: var(--g-accent); border-color: var(--g-accent); color: #fff; }
/* the label hides on very narrow phones; the numbered circles still read 1-2-3 */
@media (max-width: 360px) { .nectar-steps .t { display: none; } }

/* --- Content as a scannable list (#856) ------------------------------------
   Same shape as Publish: thumb | title+meta | affordance. Tap to edit. */
.content-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px; align-items: center; cursor: pointer;
}
.content-row > img, .content-row > .ph {
  width: 48px; height: 48px; border-radius: 4px; object-fit: cover;
}
.content-row > .ph {
  background: #eee; color: #999;
  display: flex; align-items: center; justify-content: center;
}
.content-row > .meta { min-width: 0; }
/* #884: staging rows carry the same action buttons as Publish rows */
.content-row .row-actions { display: flex; gap: 4px; }
.content-row .row-actions .btn { width: 38px; padding: .35rem 0; }
.content-row--spot { box-shadow: inset 0 0 0 2px var(--g-accent); }
/* the edit form keeps its own spacing inside the modal */
.modal .content-form .form-control, .modal .content-form .form-select { font-size: .95rem; }
/* Save closes the editor; flash the row so it is obvious it took. */
.content-row--saved { background: rgba(40,167,69,.12); transition: background .8s ease-out; }
