/* Bileşenler: yüzey, çipler, arama, ilan kartı, rozet, düğmeler, pencere (dialog), toast, durumlar */

.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* iOS homeSurface */
.surface {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--r-surface);
  box-shadow: var(--surface-shadow);
}

.circle-btn {
  width: 46px; height: 46px; border-radius: 23px; flex: none;
  display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center;
  font-size: 19px; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--surface-border); box-shadow: var(--surface-shadow);
}

/* PillChip (harita / veteriner / ilanlarım) */
.pillrow { display: -webkit-box; display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; }
.pillrow::-webkit-scrollbar { display: none; }
.pillrow--wrap { flex-wrap: wrap; overflow: visible; }
.pillchip {
  flex: none; height: var(--h-pill); padding: 0 16px; margin-right: 8px; border-radius: 20px;
  display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center;
  background: var(--surface); border: 1px solid var(--hairline); color: var(--text); font-size: var(--fs-foot); font-weight: 700; white-space: nowrap;
}
.pillrow--wrap .pillchip { margin-bottom: 8px; }
.pillchip .ic { margin-right: 6px; font-size: 15px; }
.pillchip[aria-pressed="true"] { background: var(--chip-color, var(--brand)); color: #fff; border-color: transparent; box-shadow: 0 3px 6px var(--chip-shadow, rgba(242,140,40,.35)); }
.pillchip[data-type=""][aria-pressed="true"] { color: var(--on-brand); }
.pillchip[data-type="lost"] { --chip-color: var(--lost); --chip-shadow: rgba(201,48,44,.35); }
.pillchip[data-type="found"] { --chip-color: var(--found); --chip-shadow: rgba(30,142,62,.35); }
.pillchip[data-type="adoption"] { --chip-color: var(--adoption); --chip-shadow: rgba(10,111,224,.35); }
.pillchip[data-type="seen"] { --chip-color: var(--seen); --chip-shadow: rgba(142,63,196,.35); }

/* Arama çubuğu */
.searchbar {
  height: var(--h-search); border-radius: var(--r-search); padding: 0 8px 0 18px;
  display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center;
}
.searchbar .ic { color: var(--text-2-ink); font-size: 18px; margin-right: 10px; }
.searchbar input { -webkit-box-flex: 1; flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; }
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.searchbar input::placeholder { color: var(--text-2-ink); opacity: 1; }
.searchbar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,140,40,.35); }
.icon-btn { width: 40px; height: 40px; border-radius: 20px; display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center; color: var(--text-2-ink); font-size: 18px; flex: none; }
@media (hover: hover) { .icon-btn:hover { background: var(--field-bg); } }

.linkbtn { color: var(--brand-ink); font-weight: 700; font-size: var(--fs-sub); padding: 6px 0 6px 10px; }
@media (hover: hover) { .linkbtn:hover { text-decoration: underline; } }

/* ---- ilan kartı (site kartı: foto, tür rozeti, başlık, konum, zaman) ---- */
.lcw { position: relative; min-width: 0; }
.lc {
  display: block; height: 100%; overflow: hidden; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--r-box); box-shadow: var(--surface-shadow);
}
:root:not([data-theme="dark"]) .lc { box-shadow: 0 4px 10px rgba(0,0,0,.07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lc { box-shadow: none; } }
.lc__media { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--night-top), var(--night-bottom)); -webkit-transform: translateZ(0); }
.lc__media::before { content: ""; display: block; padding-top: 72%; }
@media (max-width: 479px) { .lc__media::before { padding-top: 56%; } }
.lc__media img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lc__ph { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center; }
.lc__ph .ic { font-size: 40px; color: rgba(255,241,220,.35); }
.lc__top { position: absolute; top: 10px; left: 10px; right: 56px; display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; }
.lc__chips { position: absolute; left: 10px; bottom: 10px; display: -webkit-box; display: flex; }
.lc__body { padding: 12px 14px 14px; }
.lc__title { font-size: var(--fs-headline); font-weight: 800; line-height: 1.25; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc__animal { font-size: var(--fs-foot); font-weight: 700; color: var(--text-2-ink); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc__meta { display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; font-size: var(--fs-foot); color: var(--text-2-ink); margin-top: 8px; min-width: 0; }
.lc__meta .ic { font-size: 14px; margin-right: 5px; color: var(--brand); }
.lc__meta .loc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc__meta .ago { white-space: nowrap; flex: none; }
.lc__meta .sep { margin: 0 6px; flex: none; }
.lc__meta .sp { -webkit-box-flex: 1; flex: 1 1 auto; min-width: 6px; }
.lc__meta .dist { white-space: nowrap; flex: none; font-weight: 800; color: var(--brand-ink); }
.lc--sponsor { box-shadow: 0 0 0 2px rgba(242,140,40,.85); }
@media (hover: hover) { .lc { transition: -webkit-transform .2s var(--ease), box-shadow .2s var(--ease); transition: transform .2s var(--ease), box-shadow .2s var(--ease); } .lc:hover { -webkit-transform: translateY(-3px); transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.16); } }
.lcw .favbtn { position: absolute; top: 8px; right: 10px; z-index: 3; }

.badge-type {
  display: -webkit-inline-box; display: inline-flex; -webkit-box-align: center; align-items: center;
  padding: 5px 11px; border-radius: 99px; color: #fff; font-size: var(--fs-foot); font-weight: 800; background: var(--chip-color, var(--text-2));
  box-shadow: 0 2px 4px rgba(0,0,0,.3); max-width: 100%; white-space: nowrap;
}
.badge-type .ic { font-size: 12px; margin-right: 4px; stroke-width: 2.5; }
.badge-type[data-type="lost"] { --chip-color: var(--lost); }
.badge-type[data-type="found"] { --chip-color: var(--found); }
.badge-type[data-type="adoption"] { --chip-color: var(--adoption); }
.badge-type[data-type="seen"] { --chip-color: var(--seen); }
.badge-type[data-type="resolved"] { --chip-color: var(--found); }
/* çözülmüş ilan kartı: foto hafif soluk ve gri, okunabilir kalır */
.lc__media--resolved img { opacity: .72; -webkit-filter: grayscale(.55); filter: grayscale(.55); }
.star-badge { width: 28px; height: 28px; border-radius: 14px; margin-left: 6px; background: var(--brand); border: 1.5px solid rgba(255,255,255,.9);
  display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center; color: #fff; font-size: 13px; flex: none; }
.star-badge .ic { fill: currentColor; stroke: none; }
.mini-chip { display: -webkit-inline-box; display: inline-flex; -webkit-box-align: center; align-items: center; padding: 4px 9px; border-radius: 99px; margin-right: 6px;
  color: #fff; background: rgba(0,0,0,.55); font-size: var(--fs-cap); font-weight: 800; }
.mini-chip .ic { font-size: 11px; margin-right: 4px; stroke-width: 2.5; }
.mini-chip.brand { background: var(--brand); color: var(--on-brand); }
.mini-chip.brand .ic { margin-right: 0; }

/* İskelet */
.skel { background: var(--surface); border-radius: var(--r-box); overflow: hidden; position: relative; border: 1px solid var(--surface-border); }
.skel::before { content: ""; display: block; padding-top: 118%; }
.skel::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(100deg, rgba(128,128,128,0) 20%, rgba(128,128,128,.14) 50%, rgba(128,128,128,0) 80%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skels .skel { margin-top: 10px; }
.skel--row::before { padding-top: 0; height: 96px; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* Durumlar */
.state { text-align: center; padding: 40px 20px 24px; grid-column: 1 / -1; }
.state .mascot { width: 140px; height: 140px; margin: 0 auto 6px; display: block; }
.state > .ic { font-size: 44px; color: var(--brand); margin-bottom: 10px; }
.state h2 { font-size: var(--fs-headline); font-weight: 800; }
.state p { color: var(--text-2-ink); font-size: var(--fs-sub); margin: 6px auto 0; max-width: 420px; }
.state .btn { margin-top: 18px; }
.banner { display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: rgba(255,59,48,.12); font-size: var(--fs-sub); grid-column: 1 / -1; }
.banner .ic { color: var(--danger); margin-right: 10px; font-size: 18px; }
.banner--ok { background: rgba(30,142,62,.14); font-weight: 700; }
.banner--ok .ic { color: var(--st-active); }
.banner span { -webkit-box-flex: 1; flex: 1 1 auto; min-width: 0; }
.banner button { color: var(--brand-ink); font-weight: 800; margin-left: 10px; padding: 6px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--hairline); border-top-color: var(--brand); animation: spin .8s linear infinite; margin: 20px auto; grid-column: 1 / -1; }
@keyframes spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }

/* Düğmeler */
.btn {
  display: -webkit-inline-box; display: inline-flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center;
  min-height: 48px; padding: 13px 22px; border-radius: var(--r-btn); font-weight: 800; font-size: var(--fs-body); text-decoration: none; text-align: center;
  background: var(--brand); color: var(--on-brand); border: 0; transition: opacity .15s, transform .15s;
}
.btn:active { opacity: .85; -webkit-transform: scale(.98); transform: scale(.98); }
@media (hover: hover) { .btn:hover { opacity: .92; } }
.btn .ic { margin-right: 8px; }
.btn.block { display: -webkit-box; display: flex; width: 100%; }
.btn.sec { background: var(--field-bg); color: var(--text); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; pointer-events: none; }

/* Pencere (dialog): her ekranda ortalı */
.sheet-back { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--backdrop); padding: 16px;
  display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center; animation: fade .2s ease; }
.sheet { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--sheet-bg); color: var(--text);
  border-radius: 22px; padding: 18px 20px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: rise .25s var(--ease); }
.sheet__head { display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: justify; justify-content: space-between; margin-bottom: 8px; }
.sheet__head h2 { font-size: var(--fs-title3); font-weight: 900; }
.opt { display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; width: 100%; text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--hairline); font-size: var(--fs-body); font-weight: 600; min-height: 48px; }
.opt:last-child { border-bottom: 0; }
.opt .ic:first-child { color: var(--brand); margin-right: 12px; font-size: 18px; }
.opt .t { -webkit-box-flex: 1; flex: 1 1 auto; min-width: 0; }
.opt .ck { color: var(--brand); }
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: var(--fs-foot); font-weight: 700; color: var(--text-2-ink); margin-bottom: 6px; }
.field input, .field select { width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--field-bg); font-size: var(--fs-body); -webkit-appearance: none; appearance: none; }
.sheet__actions { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 10px; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { -webkit-transform: translateY(16px); transform: translateY(16px); opacity: .6; } to { -webkit-transform: none; transform: none; opacity: 1; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; max-width: calc(100% - 40px); padding: 11px 18px; border-radius: 99px; background: rgba(30,30,32,.94); color: #fff; font-size: var(--fs-sub); font-weight: 600;
  -webkit-transform: translateX(-50%); transform: translateX(-50%); box-shadow: 0 6px 18px rgba(0,0,0,.3); animation: fade .2s ease; text-align: center; }
