/*
 * befcrm.com — rehber ekran görüntüleri (shot bloğu, tools/guide-shots) ve görsel büyütme penceresi (js/lightbox.js).
 * Sistem rehberi makalesi ve blog yazısı yükler (site.css'ten sonra). Bağımlılık yok.
 */

/* ============================================================ Ekran görüntüsü (masaüstü + telefon) */
.prose .shot { margin-block: 1.7em; }
.shot__row { display: flex; align-items: flex-start; gap: clamp(10px, 1.6vw, 16px); }
.shot__frame {
  position: relative; display: block; flex: 1 1 0; min-width: 0;
  border-radius: var(--r); color: inherit; text-decoration: none; cursor: zoom-in; -webkit-tap-highlight-color: transparent;
}
.shot__frame--desktop { flex-grow: var(--shot-r, 3.4); }
.prose .shot__frame img {
  display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); background: #f8f8f8;
  box-shadow: 0 1px 2px rgba(15, 15, 18, .05), 0 18px 40px -26px rgba(15, 15, 18, .38);
}
.prose .shot__frame--phone img { border-radius: 18px; }
.shot__frame.is-tall img { aspect-ratio: var(--shot-ar); object-fit: cover; object-position: top; }
.shot__frame.is-tall::after {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 18%; pointer-events: none;
  border-radius: 0 0 17px 17px; background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .94));
}
.shot--desktop .shot__frame, .shot--phone .shot__frame { flex: 0 1 var(--shot-w); max-width: var(--shot-w); }
.shot--phone .shot__row { justify-content: center; }
.shot--phone .shot__frame { max-width: min(var(--shot-w), 300px); }
.shot__frame:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shot__zoom {
  position: absolute; top: 10px; inset-inline-end: 10px; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 999px; background: rgba(15, 15, 18, .72); color: #fff; pointer-events: none;
  opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s var(--ease);
}
.shot__frame--phone .shot__zoom { top: 8px; inset-inline-end: 8px; width: 28px; height: 28px; }
.shot__frame:hover .shot__zoom, .shot__frame:focus-visible .shot__zoom { opacity: 1; transform: none; }
@media (hover: none) { .shot__zoom { opacity: .8; transform: none; } }
.shot__alt { display: none; }

/* Dar ekran: yalnız telefon görüntüsü; masaüstü "Bilgisayar görünümü" bağlantısıyla büyütülerek açılır */
@media (max-width: 639px) {
  .shot--both .shot__frame--desktop { display: none; }
  .shot--both .shot__row { justify-content: center; }
  .shot--both .shot__frame--phone { flex: 0 1 260px; max-width: 260px; }
  .prose .shot__alt {
    display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; margin: 12px auto 0;
    font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink); text-decoration: none;
  }
  .prose .shot__alt:hover { color: var(--accent); }
}

/* Metindeki sıradan görseller: lightbox.js görseli bu düğmeyle sarar */
.lb-zoom {
  display: block; width: fit-content; max-width: 100%; padding: 0; border: 0; border-radius: var(--r);
  background: none; color: inherit; font: inherit; text-align: inherit; cursor: zoom-in;
}
.lb-zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ============================================================ Büyütme penceresi (<dialog class="lb">) */
html.lb-lock { overflow: hidden; }
.lb {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(12, 12, 16, .94); color: #f4f4f5; overflow: hidden;
}
.lb::backdrop { background: rgba(12, 12, 16, .5); }
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb__bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px 18px; }
.lb__count { margin: 0; margin-inline-end: auto; font-size: var(--fs-sm); color: #c9c9d1; font-variant-numeric: tabular-nums; }
.lb__btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08); color: #fff;
  transition: background-color .15s, border-color .15s;
}
.lb__btn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); }
.lb__btn:focus-visible { outline: 2px solid #fbadad; outline-offset: 2px; }
.lb__btn[hidden] { display: none; }
.lb__btn .ic, .lb__btn svg { width: 20px; height: 20px; }
.lb__zoom[aria-pressed="true"] { background: #fff; color: #111; }
.lb__body { position: relative; min-height: 0; }
.lb__stage {
  position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; display: grid; place-items: center;
  padding: 8px 68px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent;
}
.lb__img {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; background: #fff;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .7); cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}
.lb.is-fit .lb__img { cursor: default; }
.lb.is-zoomed .lb__stage { place-items: start start; place-items: start safe center; padding: 8px 12px 24px; }
.lb.is-zoomed .lb__img { width: var(--lb-w); max-width: none; max-height: none; cursor: zoom-out; }
.lb__nav { position: absolute; top: 50%; z-index: 1; margin-top: -21px; }
.lb__prev { left: 14px; }
.lb__next { right: 14px; }
.lb__nav[disabled] { opacity: .35; cursor: default; }
.lb__cap { max-width: 86ch; margin: 0 auto; padding: 8px 18px 16px; text-align: center; font-size: var(--fs-sm); line-height: 1.5; color: #d9d9e0; }
.lb__cap:empty { display: none; }
@media (max-width: 640px) {
  .lb__stage { padding: 6px 8px 64px; }
  .lb__nav { top: auto; bottom: 12px; margin-top: 0; }
  .lb__prev { left: calc(50% - 52px); }
  .lb__next { right: calc(50% - 52px); }
}
@media (prefers-reduced-motion: no-preference) {
  .lb[open] { animation: lb-in .18s var(--ease); }
  @keyframes lb-in { from { opacity: 0; } }
}
@media (min-width: 641px) {
  [dir="rtl"] .lb__prev { left: auto; right: 14px; }
  [dir="rtl"] .lb__next { right: auto; left: 14px; }
}
