/* Table card (bottom sheet) and directions picker */

.bottom-sheet {
  position: fixed; bottom: 24px; left: 50%; z-index: 500;
  width: calc(100% - 32px); max-width: 400px;
  height: auto; max-height: min(560px, calc(100dvh - 110px));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  transform: translate(-50%, calc(100% + 40px));
  transition: transform 0.5s cubic-bezier(0.34, 1.15, 0.64, 1);
  overflow: hidden;
  will-change: transform;
  display: flex; flex-direction: column;
}
@media (max-width: 480px) {
  .bottom-sheet { max-height: min(580px, calc(100dvh - 100px)); }
  .sheet-photo { height: 195px; }
  .sheet-body { padding: 10px 14px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .sheet-type { font-size: 10px; margin-bottom: 2px; }
  .sheet-name { font-size: 16px; margin-bottom: 6px; }
  .sheet-content { gap: 8px; }
  .stat-val { font-size: 13px; }
  .btn-directions { padding: 10px; font-size: 13px; }
}
.bottom-sheet.open { transform: translate(-50%, 0); }
.sheet-close-top {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.82); border: 1.5px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.sheet-close-top:active { background: rgba(0,0,0,0.95); }
.sheet-photo-wrap { position: relative; overflow: hidden; flex-shrink: 0; }
.sheet-photo { width: 100%; height: 220px; object-fit: cover; display: none; background: var(--s2); }
.sheet-photo.visible { display: block; }
.sheet-body {
  flex: 0 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 14px 10px;
}
.sheet-type { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 3px; }
.sheet-name { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.4px; line-height: 1.15; margin-bottom: 6px; }
.sheet-content {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px;
}
.sheet-stats-col {
  display: flex; flex-direction: row;
  background: var(--s2); border-radius: 10px; overflow: hidden;
  margin-bottom: 0;
}
.stat-item {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 3px; gap: 4px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-label { font-size: 7.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.stat-val { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.15; }
.stat-val.verified { color: var(--green); }
.stat-val.not-found { color: #FF3B30; }
.stat-val.stars { color: var(--orange); font-size: 11px; letter-spacing: -1px; }
.stat-val.cond-good { color: var(--green); }
.stat-val.cond-mid { color: #FF9500; }
.stat-val.cond-bad { color: #FF3B30; }
.stat-val.big-num { font-size: 13px; font-weight: 700; }
.stat-val.status-icon { font-size: 14px; }
.notes-inline {
  font-size: 11px; color: var(--muted); line-height: 1.4;
  font-style: italic;
}
.notes-tag {
  font-style: normal; font-size: 9px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--muted); opacity: 0.6; margin-right: 5px;
}
.sheet-actions { display: flex; gap: 10px; }
.btn-directions {
  flex: 1; padding: 11px; color: white;
  border: none; border-radius: 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 7px; transition: opacity 0.12s; -webkit-tap-highlight-color: transparent;
  background: var(--blue); box-shadow: 0 4px 16px rgba(59,139,255,0.35);
}
.btn-directions:active { opacity: 0.8; }
.btn-share {
  width: 46px; padding: 11px 0; color: #aaa; background: var(--s2);
  border: 1px solid var(--border); border-radius: 12px; font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: opacity 0.12s; -webkit-tap-highlight-color: transparent; flex-shrink: 0;
}
.btn-share:active { opacity: 0.7; }
/* When no photo, push sheet-body down so X button doesn't overlap the heart */
.sheet-card:not(:has(.sheet-photo.visible)) .sheet-body {
  padding-top: 52px;
}
/* Table navigation bar — sits below action buttons */
.sheet-nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sheet-nav-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--s2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, opacity 0.12s; flex-shrink: 0;
}
.sheet-nav-btn:active { background: var(--border); }
.sheet-nav-btn:disabled { opacity: 0.25; pointer-events: none; }
.sheet-nav-label {
  font-size: 12px; color: var(--muted); font-weight: 600;
  letter-spacing: 0.3px; text-align: center;
}
/* Name row with heart */
.sheet-name-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.sheet-name-row .sheet-name { margin-bottom: 0; flex: 1; }
.btn-heart-inline {
  flex-shrink: 0; background: transparent; border: none;
  padding: 3px 0 0 4px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex; align-items: flex-start;
}
.btn-heart-inline svg { transition: transform 0.18s cubic-bezier(0.34,1.5,0.64,1); }
.btn-heart-inline.faved svg { transform: scale(1.2); }
.maps-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 1100; backdrop-filter: blur(2px);
}
.maps-modal-overlay.open { display: block; }
.maps-modal {
  display: none; position: fixed; left: 50%; bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  width: min(340px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 16px; z-index: 1101;
  flex-direction: column; gap: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  transition: transform 0.22s ease, opacity 0.22s ease; opacity: 0;
}
.maps-modal.open {
  display: flex; transform: translateX(-50%) translateY(0); opacity: 1;
}
.maps-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  color: #888; font-size: 13px; font-weight: 500; margin-bottom: 2px;
}
.maps-modal-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--s2); color: #aaa; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.btn-maps-option {
  width: 100%; padding: 14px; color: white; border: none; border-radius: 14px;
  font-size: 14.5px; font-weight: 600; cursor: pointer; display: flex; align-items: center;
  gap: 9px; transition: opacity 0.12s; -webkit-tap-highlight-color: transparent;
}
.btn-maps-option:active { opacity: 0.8; }
.btn-gmaps { background: var(--blue);  box-shadow: 0 3px 12px rgba(59,139,255,0.3); }
.btn-amaps { background: #3a3a45;      box-shadow: 0 3px 12px rgba(0,0,0,0.2); }
