/* ==========================================================================
   Lendumine — App marketing screens (iPhone mockups)
   High-fidelity in-device UI for the Lendumine app. px-based, scaled to a
   ~300px phone so screens read like real App Store screenshots.
   ========================================================================== */

/* Gallery */
.screens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(2rem, 1rem + 3vw, 3.5rem) var(--space-6);
  justify-items: center;
}
.screen { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.screen__caption { text-align: center; }
.screen__caption h3 { font-size: var(--text-h4); }
.screen__caption p { color: var(--color-ink-muted); font-size: var(--text-sm); max-width: 30ch; }

/* Hero cluster of overlapping phones */
.phone-cluster { display: flex; justify-content: center; align-items: flex-end; gap: 0; }
.phone-cluster .phone { width: 232px; }
.phone-cluster .phone:nth-child(1) { transform: rotate(-6deg) translateY(14px); z-index: 1; margin-right: -34px; }
.phone-cluster .phone:nth-child(2) { z-index: 3; }
.phone-cluster .phone:nth-child(3) { transform: rotate(6deg) translateY(14px); z-index: 1; margin-left: -34px; }
@media (max-width: 560px) { .phone-cluster .phone:nth-child(1), .phone-cluster .phone:nth-child(3) { display: none; } }

/* --------------------------------------------------------------------------
   DEVICE FRAME
   -------------------------------------------------------------------------- */
.phone {
  --pw: 300px;
  width: var(--pw);
  aspect-ratio: 300 / 644;
  background: linear-gradient(160deg, #1b2a3a, #0b1622);
  border-radius: 46px;
  padding: 11px;
  box-shadow: var(--shadow-xl), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  position: relative;
  flex: none;
}
.phone__screen {
  position: relative;
  width: 100%; height: 100%;
  background: var(--color-bg);
  border-radius: 36px;
  overflow: hidden;
  display: flex; flex-direction: column;
  font-size: 13px;
  line-height: 1.35;
  color: var(--color-ink);
}
.phone__island {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 22px; background: #05080c; border-radius: 12px; z-index: 6;
}

/* Status bar */
.a-status { display: flex; justify-content: space-between; align-items: center; padding: 9px 16px 2px; font-size: 12px; font-weight: 700; }
.a-status__r { display: flex; align-items: center; gap: 5px; }
.a-status__r i { display: block; width: 16px; height: 10px; border: 1.4px solid currentColor; border-radius: 3px; position: relative; opacity: 0.9; }
.a-status__r i::after { content: ""; position: absolute; top: 2px; left: 1.4px; bottom: 2px; width: 9px; background: currentColor; border-radius: 1px; }
.a-status__bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.a-status__bars b { width: 3px; background: currentColor; border-radius: 1px; }
.a-status__bars b:nth-child(1){height:4px}.a-status__bars b:nth-child(2){height:6px}.a-status__bars b:nth-child(3){height:8px}.a-status__bars b:nth-child(4){height:11px}

/* App body (scroll area, clipped) */
.a-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 6px 14px 12px; }
.a-body--flush { padding: 0; }

/* Headers */
.a-head { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.a-loc { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 15px; color: var(--color-secondary); }
.a-loc svg { width: 15px; height: 15px; color: var(--color-teal-ink); }
.a-head__actions { display: flex; align-items: center; gap: 10px; }
.a-iconbtn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--color-bg-elevated); border: 1px solid var(--color-border); color: var(--color-ink); position: relative; }
.a-iconbtn svg { width: 16px; height: 16px; }
.a-iconbtn .badge { position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-danger); border: 1.5px solid var(--color-bg); }
.a-title { font-size: 19px; font-weight: 700; color: var(--color-secondary); letter-spacing: -0.01em; }
.a-title--center { text-align: center; }

.a-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--color-accent-strong); color: var(--color-secondary); display: grid; place-items: center; font-size: 11px; font-weight: 700; overflow: hidden; flex: none; }
.a-avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.a-avatar--xl { width: 76px; height: 76px; font-size: 24px; }

/* Search */
.a-search { display: flex; align-items: center; gap: 8px; background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 999px; padding: 9px 14px; color: var(--color-ink-muted); font-size: 13px; }
.a-search svg { width: 16px; height: 16px; }
.a-search--filter { justify-content: space-between; }

/* Chips */
.a-chips { display: flex; gap: 7px; overflow: hidden; }
.a-chip { white-space: nowrap; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--color-bg-elevated); border: 1px solid var(--color-border); color: var(--color-ink-secondary); display: inline-flex; align-items: center; gap: 5px; }
.a-chip svg { width: 13px; height: 13px; }
.a-chip.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.a-chip--teal { background: var(--color-accent); color: var(--color-teal-ink); border-color: transparent; }
.a-chip--ok { background: var(--color-success-bg); color: var(--color-success); border-color: transparent; }

.a-section-h { display: flex; align-items: center; justify-content: space-between; }
.a-section-h h4 { font-size: 14px; font-weight: 700; color: var(--color-secondary); }
.a-section-h a { font-size: 12px; color: var(--color-teal-ink); font-weight: 600; }

/* Circle avatars row */
.a-circles { display: flex; gap: 12px; }
.a-circle { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; color: var(--color-ink-secondary); }
.a-circle__ring { width: 42px; height: 42px; border-radius: 50%; padding: 2px; background: linear-gradient(140deg, var(--color-teal), var(--color-primary)); }
.a-circle__ring .a-avatar { width: 100%; height: 100%; border: 2px solid var(--color-bg); }
.a-circle--add .a-circle__ring { background: var(--color-border); }
.a-circle--add .a-avatar { background: var(--color-bg-elevated); color: var(--color-teal-ink); }

/* Item card */
.a-item { background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-xs); }
.a-item__img { aspect-ratio: 16/10; position: relative; }
.a-item__fav { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.92); display: grid; place-items: center; color: var(--color-ink-secondary); }
.a-item__fav svg { width: 13px; height: 13px; }
.a-item__fav.is-on { color: var(--color-danger); }
.a-item__tag { position: absolute; top: 8px; left: 8px; }
.a-item__b { padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; }
.a-item__t { font-size: 13px; font-weight: 600; color: var(--color-ink); }
.a-item__m { font-size: 11px; color: var(--color-ink-muted); display: flex; align-items: center; gap: 4px; }
.a-item__m svg { width: 11px; height: 11px; }
.a-item__row { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.a-price { font-size: 14px; font-weight: 700; color: var(--color-secondary); }
.a-price small { font-size: 10px; font-weight: 400; color: var(--color-ink-muted); }
.a-rate { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }
.a-rate svg { width: 12px; height: 12px; color: var(--color-rating); }

.a-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* generic mini chip tag on imagery */
.tag { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,0.95); color: var(--color-teal-ink); display: inline-flex; align-items: center; gap: 4px; }
.tag svg { width: 11px; height: 11px; }
.tag--solid { background: var(--color-teal); color: var(--color-secondary); }

/* Bottom tab bar */
.a-tabbar { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 22px 14px; background: var(--color-bg-elevated); border-top: 1px solid var(--color-border); }
.a-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9px; font-weight: 600; color: var(--color-ink-muted); flex: 1; }
.a-tab svg { width: 21px; height: 21px; }
.a-tab.is-active { color: var(--color-primary); }
.a-tab--fab { flex: none; }
.a-fab { width: 46px; height: 46px; border-radius: 16px; background: linear-gradient(150deg, var(--color-teal), var(--color-primary)); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-md); transform: translateY(-6px); }
.a-fab svg { width: 22px; height: 22px; }

/* Sticky bottom action (item detail / workflows) */
.a-bottombar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 16px; background: var(--color-bg-elevated); border-top: 1px solid var(--color-border); }
.a-btn { flex: 1; text-align: center; background: var(--color-primary); color: #fff; font-weight: 700; font-size: 14px; padding: 12px; border-radius: 14px; }
.a-btn--teal { background: var(--color-teal); color: var(--color-secondary); }
.a-btn--block { width: 100%; }

/* Detail image header */
.a-hero-img { aspect-ratio: 16/12; position: relative; }
.a-hero-img__top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; }
.a-hero-img__top .a-iconbtn { background: rgba(255,255,255,0.92); border: none; }

/* List / rows */
.a-listrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--color-border); }
.a-listrow:first-child { border-top: 0; }
.a-listrow__t { font-size: 13px; font-weight: 600; }
.a-listrow__s { font-size: 11px; color: var(--color-ink-muted); }
.a-listrow .grow { flex: 1; }
.a-time { font-size: 10px; color: var(--color-ink-muted); }
.a-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--color-teal); }

/* Chat bubbles */
.a-bubble { max-width: 78%; padding: 8px 11px; border-radius: 14px; font-size: 12px; }
.a-bubble--in { background: var(--color-bg-elevated); border: 1px solid var(--color-border); align-self: flex-start; border-bottom-left-radius: 4px; }
.a-bubble--out { background: var(--color-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

/* Generic surface block in app */
.a-block { background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 14px; padding: 12px; }
.a-block--accent { background: var(--color-accent); border-color: transparent; }
.a-divider { height: 1px; background: var(--color-border); }

/* Price breakdown rows */
.a-pricerow { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; color: var(--color-ink-secondary); }
.a-pricerow--total { font-weight: 700; color: var(--color-ink); font-size: 14px; border-top: 1px solid var(--color-border); padding-top: 8px; margin-top: 4px; }

/* Checklist */
.a-check { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 9px 0; border-top: 1px solid var(--color-border); }
.a-check:first-child { border-top: 0; }
.a-check__box { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--color-success); color: #fff; }
.a-check__box svg { width: 13px; height: 13px; }
.a-check__box--empty { background: transparent; border: 2px solid var(--color-border-strong); }

/* Step progress */
.a-steps { display: flex; align-items: center; gap: 6px; }
.a-steps b { flex: 1; height: 4px; border-radius: 2px; background: var(--color-border); }
.a-steps b.is-done { background: var(--color-teal); }

/* Profile stat */
.a-stats { display: flex; }
.a-stat { flex: 1; text-align: center; }
.a-stat b { display: block; font-size: 16px; font-weight: 700; color: var(--color-secondary); }
.a-stat span { font-size: 10px; color: var(--color-ink-muted); }

/* photo upload thumbs */
.a-photos { display: flex; gap: 8px; }
.a-photo { width: 52px; height: 52px; border-radius: 10px; }
.a-photo--add { border: 1.5px dashed var(--color-border-strong); display: grid; place-items: center; color: var(--color-ink-muted); }
.a-photo--add svg { width: 18px; height: 18px; }
