/* Refika — ortak portre seçici (kurulum, tablet ayarları, aile uygulaması) · 0.7.7
   js/portre-secici.js ile birlikte kullanılır. */

.portre { display: grid; gap: 14px; text-align: left; }
.portre .btn.genis { width: 100%; white-space: normal; height: auto; min-height: 56px; line-height: 1.3; padding: 12px 20px; }
.portre-aciklama { margin: 0; color: var(--lacivert-2); line-height: 1.5; }
.portre-aciklama b { color: var(--lacivert); font-weight: 600; }
.portre-yardim { display: block; color: var(--lacivert-3, #6B6355); line-height: 1.45; }
.portre-durum { margin: 0; color: var(--lacivert-2); min-height: 0; }
.portre-durum:empty { display: none; }
.portre.calisiyor .portre-durum::before {
  content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 9px; vertical-align: -1px;
  border-radius: 50%; border: 2px solid var(--firuze-acik); border-top-color: var(--firuze);
  animation: portre-don 0.9s linear infinite;
}
@keyframes portre-don { to { transform: rotate(360deg); } }

/* Onay kutusu: büyük dokunma alanı */
.portre .onay-satir { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; color: var(--lacivert-2); line-height: 1.45; }
.portre .onay-satir input { width: 26px; height: 26px; margin: 0; accent-color: var(--firuze); flex: none; }
.gizlilik-ac { color: var(--firuze-koyu); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* 4 seçenek: küçük resim + "Bunu seç" */
.portre .portre-secenekler { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.portre .portre-secenekler:empty { display: none; }
.portre-kart { margin: 0; display: grid; gap: 8px; border-radius: 20px; }
.portre-kart .portre-secenek {
  position: relative; padding: 0; border: 3px solid transparent; border-radius: 18px; overflow: hidden;
  background: var(--sis); cursor: zoom-in; aspect-ratio: 1; width: 100%;
}
.portre-kart .portre-secenek img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portre-kart .portre-secenek:focus-visible { outline: 3px solid var(--firuze); outline-offset: 2px; }
.portre-buyut {
  position: absolute; right: 8px; bottom: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(42, 36, 22, 0.72); color: #fff; font-size: 14px; font-weight: 500; pointer-events: none;
}
.portre-kart .portre-bunu { min-height: 48px; width: 100%; padding: 0 10px; }
.portre-kart.secili .portre-secenek { border-color: var(--firuze); }
.portre-kart button:disabled { cursor: default; }
.portre-kart:has(button:disabled):not(.secili) { opacity: 0.45; }
@media (max-width: 640px) { .portre .portre-secenekler { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- katmanlar (büyük görünüm, gizlilik) */
.katman { position: fixed; inset: 0; z-index: 200; display: grid; }

.buyuk-katman {
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  background: rgba(10, 22, 26, 0.94);
  color: #fff;
  padding: max(12px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
  animation: katman-gir 0.2s ease-out;
}
@keyframes katman-gir { from { opacity: 0; } }
.buyuk-sahne { position: relative; min-height: 0; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.buyuk-resim { margin: 0; min-height: 0; min-width: 0; height: 100%; display: grid; place-items: center; }
.buyuk-resim img {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.buyuk-ok {
  width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer;
}
.buyuk-ok[hidden] { display: none; }
.buyuk-ok svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.buyuk-ok:focus-visible { outline: 3px solid var(--firuze-acik); outline-offset: 3px; }
.buyuk-alt { display: grid; justify-items: center; gap: 10px; padding-top: 12px; }
.buyuk-sayac { margin: 0; font-size: 16px; opacity: 0.85; }
.buyuk-dugmeler { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.buyuk-dugmeler .btn { min-height: 56px; min-width: 160px; font-size: 18px; }
.buyuk-dugmeler .btn-cizgi { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.buyuk-dugmeler .btn-cizgi:hover { border-color: #fff; }
@media (max-width: 520px) {
  .buyuk-sahne { grid-template-columns: minmax(0, 1fr); }
  .buyuk-ok { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; background: rgba(0, 0, 0, 0.45); }
  .buyuk-ok.sol { left: 10px; }
  .buyuk-ok.sag { right: 10px; }
  .buyuk-dugmeler { width: 100%; }
  .buyuk-dugmeler .btn { flex: 1; min-width: 0; }
}

.gizlilik-katman { place-items: center; padding: 16px; background: rgba(10, 22, 26, 0.6); }
.gizlilik-kart {
  width: min(760px, 100%); height: min(86vh, 900px); height: min(86dvh, 900px);
  display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden;
  border-radius: 22px; background: var(--kagit); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.gizlilik-kart iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.katman-alt { display: flex; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--sis-2); }
.katman-alt .btn { min-height: 52px; }

@media (prefers-reduced-motion: reduce) {
  .portre.calisiyor .portre-durum::before { animation: none; }
  .buyuk-katman { animation: none; }
}

/* Her ekranda kolay çıkış: sağ üstte büyük ✕ (telefon, tablet, bilgisayar) */
.katman-x {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.katman-x:hover, .katman-x:focus-visible { background: rgba(0, 0, 0, 0.8); outline: 3px solid #fff; outline-offset: 2px; }

/* 16 Ekim 2026: tek portre (maliyet) — ortada, daha büyük. */
.portre .portre-secenekler.tek { grid-template-columns: minmax(0, 320px); justify-content: center; }
