﻿/* ============================================================
   Estately â€” styles.css
   Author: Claude | Date: 2026-05-03
   Design: Navy bg, cream cards, Poppins, celeste chips
   ============================================================ */

:root {
  --cream:    #FCF3E3;
  --navy:     #013D5A;
  --celeste:  #BDD3CE;
  --herb:     #708C69;
  --marigold: #F6A258;
  --muted:    #6B7B8A;
  --radius:   16px;
  --chip-r:   20px;
  --shadow:   0 4px 18px rgba(1,61,90,0.18);
  --tabbar-h: 68px;
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: ''Poppins'', sans-serif;
  background: var(--navy);
  color: var(--cream);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  min-height: 100vh;
}

/* â”€â”€ Header â”€â”€ */
.app-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  background: var(--navy);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 20px 10px;
  border-bottom: 1px solid rgba(189,211,206,0.12);
}
.app-header h1 { font-size: 26px; font-weight: 800; color: var(--cream); letter-spacing: -0.5px; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  background: rgba(252,243,227,0.1); border: none; border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--cream); cursor: pointer;
}

/* â”€â”€ Location bar â”€â”€ */
.location-row, .location-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 20px 4px;
  font-size: 12px; font-weight: 600; color: var(--celeste);
  cursor: pointer; user-select: none;
}
.location-radius { opacity: 0.75; }
.location-edit { margin-left: auto; font-size: 16px; opacity: 0.5; }

/* â”€â”€ Location modal â”€â”€ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(1,20,35,0.7); align-items: flex-end;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  width: 100%; background: var(--navy);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(189,211,206,0.15);
  padding: 0 0 env(safe-area-inset-bottom);
  animation: slideUp 0.22s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(189,211,206,0.1);
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--cream); }
.modal-close {
  background: rgba(252,243,227,0.1); border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 14px; color: var(--cream); cursor: pointer;
}
.modal-body { padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.location-search-row { display: flex; gap: 8px; }
.location-input {
  flex: 1; background: rgba(252,243,227,0.08); border: 1.5px solid rgba(189,211,206,0.25);
  border-radius: var(--chip-r); padding: 10px 16px;
  font-size: 14px; font-family: ''Poppins'', sans-serif; color: var(--cream);
  outline: none;
}
.location-input::placeholder { color: rgba(252,243,227,0.35); }
.location-input:focus { border-color: var(--celeste); }
.btn-search {
  background: var(--celeste); color: var(--navy); border: none;
  border-radius: var(--chip-r); padding: 10px 18px;
  font-size: 13px; font-weight: 700; font-family: ''Poppins'', sans-serif; cursor: pointer;
}
.btn-my-location {
  background: rgba(252,243,227,0.08); border: 1.5px solid rgba(189,211,206,0.25);
  border-radius: var(--chip-r); padding: 10px 16px;
  font-size: 13px; font-weight: 600; color: var(--cream);
  font-family: ''Poppins'', sans-serif; cursor: pointer; text-align: left;
}
.modal-section-label { font-size: 11px; font-weight: 700; color: var(--celeste); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 4px; }
.radius-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.radius-chip {
  padding: 6px 14px; border-radius: var(--chip-r);
  border: 1.5px solid rgba(189,211,206,0.3);
  background: transparent; color: rgba(252,243,227,0.75);
  font-size: 12px; font-weight: 600; font-family: ''Poppins'', sans-serif; cursor: pointer;
  transition: all 0.15s;
}
.radius-chip.active { background: var(--cream); color: var(--navy); border-color: var(--cream); }

/* â”€â”€ Views â”€â”€ */
.view { display: none; padding-top: 8px; }
.view.active { display: block; }

/* â”€â”€ Filter chips â”€â”€ */
.filter-row {
  display: flex; gap: 8px;
  padding: 8px 16px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 6px 14px; border-radius: var(--chip-r);
  border: 1.5px solid rgba(189,211,206,0.4);
  background: transparent; color: rgba(252,243,227,0.8);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  font-family: ''Poppins'', sans-serif; cursor: pointer;
  transition: all 0.15s; flex-shrink: 0;
}
.filter-chip.active { background: var(--cream); color: var(--navy); border-color: var(--cream); }

/* â”€â”€ Card list â”€â”€ */
.card-list { list-style: none; padding: 0 16px 20px; display: flex; flex-direction: column; gap: 10px; }

/* â”€â”€ Sale card â”€â”€ */
.sale-card {
  background: var(--cream); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.15s; display: block;
}
.sale-card:active { transform: scale(0.985); }

/* Photo strip â€” horizontal scrollable row of thumbnails */
.card-photo-strip {
  position: relative;
  display: flex; gap: 2px;
  height: 118px; overflow-x: auto; padding: 4px; gap: 4px; overflow-y: hidden;
  scrollbar-width: none; scroll-snap-type: x mandatory;
  background: linear-gradient(135deg, #BDD3CE, #8ab0aa);
}
.card-photo-strip::-webkit-scrollbar { display: none; } @media (min-width: 600px) { .card-photo-strip { grid-template-columns: repeat(4, 1fr); aspect-ratio: 21/9; } } @media (min-width: 900px) { .sale-card { max-width: 700px; margin: 0 auto; } }
.card-photo-strip img { flex-shrink: 0; width: 110px; height: 110px; object-fit: cover; scroll-snap-align: start; display: block; border-radius: 6px; }
.card-photo-strip img + img { width: 100px; } /* first is full-width hero, rest are peek thumbnails */
.card-img-wrap { flex-shrink: 0; width: 100%; height: 160px; position: relative; }
.card-img { width: 100%; height: 160px; object-fit: cover; display: block; border-radius: 6px; }
.card-img-placeholder { flex-shrink: 0; width: 100%; height: 160px; background: linear-gradient(135deg, #BDD3CE, #8ab0aa); border-radius: 6px; }

.card-img-skeleton {
  width: 100%; height: 160px;
  background: linear-gradient(90deg, rgba(189,211,206,0.15) 25%, rgba(189,211,206,0.3) 50%, rgba(189,211,206,0.15) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.card-photo-placeholder {
  flex-shrink: 0; width: 100%; height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; opacity: 0.5;
  background: linear-gradient(135deg, #BDD3CE, #013D5A);
}

/* Overlay badges on photo strip */
.card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 4px; z-index: 2;
}
.today-badge {
  background: var(--marigold); color: white;
  font-size: 10px; font-weight: 800; padding: 3px 10px;
  border-radius: 12px; letter-spacing: 0.5px; text-transform: uppercase;
  display: inline-block;
}
.new-badge {
  background: var(--herb); color: white;
  font-size: 10px; font-weight: 800; padding: 3px 10px;
  border-radius: 12px; letter-spacing: 0.5px; text-transform: uppercase;
  display: inline-block;
}
.sale-type-badge {
  background: rgba(1,61,90,0.82); color: var(--celeste);
  font-size: 9px; font-weight: 700; padding: 3px 8px;
  border-radius: 10px; text-transform: uppercase; letter-spacing: 0.3px;
  display: inline-block;
}
.dist-pill {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  background: rgba(1,61,90,0.88); color: var(--cream);
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
}

/* Card body */
.card-body { padding: 10px 12px 12px; }
.card-chips { display: flex; gap: 6px; align-items: center; margin-bottom: 5px; flex-wrap: wrap; }
.card-chip { background: var(--celeste); color: var(--navy); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--chip-r); }
.card-chip-new { background: var(--marigold); color: white; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--chip-r); margin-left: auto; }

.card-title { font-size: 16px; font-weight: 700; color: var(--navy); line-height: 1.3; margin-bottom: 1px; }
.card-org { font-size: 12px; font-weight: 500; color: var(--herb); margin-bottom: 3px; }
.card-dates { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 1px; }
.card-time { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.card-address { font-size: 11px; color: var(--muted); margin-bottom: 12px; }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 7px; border-top: 1px solid rgba(1,61,90,0.08);
}
.btn-detail {
  background: transparent; color: var(--navy);
  border: 1.5px solid rgba(1,61,90,0.2); border-radius: var(--chip-r);
  padding: 7px 14px; font-size: 12px; font-weight: 600;
  font-family: ''Poppins'', sans-serif; cursor: pointer;
  min-height: 36px;
}
.btn-save {
  background: var(--herb); color: white; border: none;
  border-radius: var(--chip-r); padding: 8px 16px;
  font-size: 12px; font-weight: 700; font-family: ''Poppins'', sans-serif;
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  min-height: 36px; transition: opacity 0.15s;
}
.btn-save:active { opacity: 0.8; }
.btn-save.saved { background: var(--navy); }

/* â”€â”€ Identify â”€â”€ */
#view-identify { padding: 20px 16px; }
.identify-title { font-size: 24px; font-weight: 800; color: var(--cream); margin-bottom: 4px; }
.identify-sub { font-size: 13px; color: var(--celeste); margin-bottom: 20px; line-height: 1.5; }
.upload-zone {
  border: 2.5px dashed var(--celeste); border-radius: var(--radius);
  padding: 48px 24px; text-align: center;
  background: rgba(252,243,227,0.05); margin-bottom: 20px;
  cursor: pointer; transition: border-color 0.15s; display: block;
}
.upload-zone:hover { border-color: var(--cream); }
.upload-zone input { display: none; }
.upload-icon { font-size: 48px; margin-bottom: 14px; }
.upload-title { font-size: 18px; font-weight: 700; color: var(--cream); margin-bottom: 6px; }
.upload-sub { font-size: 13px; color: var(--celeste); }
#identify-preview img { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; display: block; }
.result-card { background: var(--cream); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.result-label { background: var(--herb); color: white; font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 5px 16px; text-align: center; }
.result-inner { display: flex; gap: 14px; padding: 16px; align-items: center; }
.result-img { width: 72px; height: 72px; background: var(--celeste); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 36px; flex-shrink: 0; overflow: hidden; }
.result-img img { width: 100%; height: 100%; object-fit: cover; }
.result-name { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.result-cat { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.result-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.result-tag { background: var(--celeste); color: var(--navy); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.identify-empty { text-align: center; padding: 24px 0; color: var(--celeste); font-size: 13px; }

/* â”€â”€ Saved â”€â”€ */
#view-saved { padding: 0 16px 20px; }
.saved-header { font-size: 24px; font-weight: 800; color: var(--cream); padding: 16px 0 12px; }
.saved-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.saved-tab {
  padding: 6px 16px; border-radius: var(--chip-r);
  border: 1.5px solid rgba(189,211,206,0.35);
  color: rgba(252,243,227,0.65); font-size: 12px; font-weight: 700;
  font-family: ''Poppins'', sans-serif; background: transparent; cursor: pointer; transition: all 0.15s;
}
.saved-tab.active { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.saved-card {
  background: var(--cream); border-radius: var(--radius);
  overflow: hidden; display: flex; margin-bottom: 10px;
  box-shadow: var(--shadow); cursor: pointer;
}
.saved-card-img { width: 90px; height: 90px; flex-shrink: 0; object-fit: cover; background: linear-gradient(135deg,var(--celeste),#8ab0aa); }
.saved-card-body { padding: 10px 12px; flex: 1; }
.saved-card-title { font-size: 13px; font-weight: 700; color: var(--navy); line-height: 1.3; margin-bottom: 2px; }
.saved-card-org { font-size: 11px; color: var(--herb); margin-bottom: 2px; }
.saved-card-date { font-size: 11px; font-weight: 600; color: var(--navy); margin-bottom: 1px; }
.saved-card-addr { font-size: 10px; color: var(--muted); }
.saved-card-right { padding: 10px 12px 10px 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.saved-card-dist { font-size: 11px; font-weight: 700; color: var(--muted); }
.saved-card-heart { font-size: 18px; cursor: pointer; }
.saved-items-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.item-card { background: var(--cream); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.item-card-img { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 36px; background: linear-gradient(135deg,var(--celeste),#8ab0aa); }
.item-card-body { padding: 8px 10px 10px; }
.item-card-name { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.item-card-val { font-size: 11px; color: var(--herb); font-weight: 600; }
.saved-empty { text-align: center; padding: 48px 20px; color: var(--celeste); font-size: 14px; }
.section-head { font-size: 14px; font-weight: 700; color: var(--cream); margin: 16px 0 10px; }

/* â”€â”€ Account â”€â”€ */
#view-account { padding: 20px 16px; }
.profile-block { text-align: center; padding: 12px 0 24px; }
.profile-avatar { width: 72px; height: 72px; background: linear-gradient(135deg,var(--celeste),var(--navy)); border-radius: 50%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.profile-name { font-size: 18px; font-weight: 700; color: var(--cream); }
.profile-loc { font-size: 12px; color: var(--celeste); margin-top: 2px; }
.settings-group { background: var(--cream); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow); }
.settings-item { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(1,61,90,0.08); cursor: pointer; }
.settings-item:last-child { border-bottom: none; }
.settings-icon { font-size: 16px; width: 28px; }
.settings-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--navy); }
.settings-value { font-size: 12px; color: var(--muted); margin-right: 6px; }
.settings-arrow { color: var(--celeste); font-weight: 700; font-size: 14px; }
.app-version { text-align: center; font-size: 11px; color: rgba(189,211,206,0.35); margin-top: 16px; }

/* â”€â”€ Bottom nav â”€â”€ */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: var(--tabbar-h); background: var(--cream); display: flex; padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: none; cursor: pointer; font-family: ''Poppins'', sans-serif; padding: 8px 0; transition: transform 0.1s; }
.tab:active { transform: scale(0.92); }
.tab-icon { font-size: 20px; opacity: 0.3; transition: opacity 0.15s; }
.tab-label { font-size: 10px; font-weight: 700; color: var(--muted); transition: color 0.15s; }
.tab.active .tab-icon { opacity: 1; }
.tab.active .tab-label { color: var(--navy); }

/* â”€â”€ States â”€â”€ */
.loading { text-align: center; padding: 48px 20px; color: var(--celeste); font-size: 14px; list-style: none; }
.error-msg { text-align: center; padding: 48px 20px; color: var(--marigold); font-size: 14px; list-style: none; }

/* â”€â”€ Result actions â”€â”€ */
.result-actions {
  padding: 0 16px 14px;
  display: flex;
  justify-content: center;
}
.btn-identify-another {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(1,61,90,0.25);
  border-radius: var(--chip-r);
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: ''Poppins'', sans-serif;
  cursor: pointer;
  min-height: 40px;
}




.placeholder-logo { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 800; color: rgba(252,243,227,0.6); letter-spacing: -0.5px; }

.data-status {
  margin: 0 16px 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(189,211,206,0.12);
  color: var(--celeste);
  font-size: 11px;
  line-height: 1.4;
}

.card-img { object-fit: cover; background: #d7dfdc; }
.upload-zone, .btn-save, .btn-detail, .filter-chip, .saved-tab, .tab { min-height: 44px; }

.result-actions { padding: 0 16px 16px; }
.btn-identify-another {
  width: 100%; border: none; border-radius: 12px; min-height: 44px;
  background: var(--navy); color: var(--cream); font-weight: 700; font-family: 'Poppins', sans-serif;
}
