/* ══════════════════════════════════════════════════════════════════
   v5.14 — pixelplanet pencere görünümü: Ayarlar (ppf-settings.js) ve
   Modtools (modtools.js). Sınıf adları pixelplanet'inkiyle aynı
   (setitem, setrow, settitle, modaldesc, modaldivider, modallink…).
   Renkler 40-planet'in --pp-* değişkenlerinden: açık/koyu tema kendiliğinden.
   ══════════════════════════════════════════════════════════════════ */
.ppf-ov{
  position:fixed; inset:0; z-index:2147482000;
  background:var(--pp-veil, rgba(255,255,255,.6));
  display:flex; align-items:center; justify-content:center; padding:16px;
}
html#pp#pp body .ppf-win{
  width:min(560px, 100%); max-height:min(86vh, 860px);
  display:flex; flex-direction:column;
  background:var(--pp-win, #fcfcfc); color:var(--pp-txt, #000);
  border:1px solid var(--pp-line, #000); border-radius:0;
  font:400 14px/1.4 'Montserrat', Arial, sans-serif; box-shadow:none;
}
html#pp#pp body .ppf-win.ppf-win-wide{ width:min(760px, 100%); }
html#pp#pp body .ppf-win-bar{
  display:flex; align-items:center; gap:8px; padding:4px 6px 4px 12px;
  border-bottom:1px solid var(--pp-line, #000); background:var(--pp-ctl-sel, #e8e8e8);
}
html#pp#pp body .ppf-win-t{ flex:1; font-weight:700; font-size:15px; }
html#pp#pp body .ppf-win-x{
  width:28px !important; height:28px !important; min-width:28px !important; min-height:28px !important;
  padding:0 !important; border:1px solid var(--pp-line, #000) !important;
  background:var(--pp-ctl, #f7f7f7) !important; color:var(--pp-txt, #000) !important;
  font-size:14px !important; line-height:1 !important; cursor:pointer;
}
html#pp#pp body .ppf-win-x:hover{ background:var(--pp-close-hi, #f29696) !important; }
html#pp#pp body .ppf-win-body{ overflow:auto; padding:10px 14px 14px; }

/* Ayarlar satırları */
html#pp#pp body .ppf-win .setitem{ margin:0; }
html#pp#pp body .ppf-win .setrow{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
html#pp#pp body .ppf-win .settitle{ margin:8px 0 2px; font-size:15px; font-weight:700; color:var(--pp-txt, #000); }
html#pp#pp body .ppf-win kbd{
  display:inline-block; min-width:1.4em; padding:0 .35em; margin-left:.3em;
  border:1px solid var(--pp-sep, #b1b1b2); border-bottom-width:2px; border-radius:3px;
  font:700 12px/1.5 'Montserrat', Arial, sans-serif; text-align:center;
  background:var(--pp-ctl, #f7f7f7); color:var(--pp-txt, #000);
}
html#pp#pp body .ppf-win .settings-checkbox{ width:20px; height:20px; flex-shrink:0; cursor:pointer; accent-color:var(--pp-link, #428bca); }
html#pp#pp body .ppf-win .modaldesc{ color:var(--pp-cap, #6e6e6e); font-size:13px; margin:0 0 8px; }
html#pp#pp body .ppf-win .modaldesc .warn{ color:var(--pp-err, #b73c3c); margin:4px 0 0; }
html#pp#pp body .ppf-win .modaldivider{ height:1px; background:var(--pp-sep, #b1b1b2); margin:6px 0; }
html#pp#pp body .ppf-win select,
html#pp#pp body .ppf-win input[type="text"],
html#pp#pp body .ppf-win input[type="number"],
html#pp#pp body .ppf-win input[type="datetime-local"],
html#pp#pp body .ppf-win textarea{
  background:var(--pp-in-bg, #fff); color:var(--pp-in-txt, #000);
  border:1px solid var(--pp-in-bd, #ccc); border-radius:0; padding:4px 6px;
  font:400 13px 'Montserrat', Arial, sans-serif; max-width:100%; box-sizing:border-box;
}
html#pp#pp body .ppf-win h3{ margin:10px 0 4px; font-size:15px; font-weight:700; }
html#pp#pp body .ppf-win p{ margin:4px 0; }

/* Modtools sekmeleri (pixelplanet .modallink) */
html#pp#pp body .ppf-win .tab-container{ display:flex; flex-wrap:wrap; align-items:center; gap:2px 0; }
html#pp#pp body .ppf-win .modallink{ color:var(--pp-link, #428bca); text-decoration:underline; cursor:pointer; padding:2px 8px; font-weight:400; }
html#pp#pp body .ppf-win .modallink.selected{ color:var(--pp-txt, #000); font-weight:700; text-decoration:none; }
html#pp#pp body .ppf-win .hdivider{ width:1px; height:14px; background:var(--pp-sep, #b1b1b2); }
html#pp#pp body .ppf-win .mt-submit,
html#pp#pp body .ppf-win .mt-here,
html#pp#pp body .ppf-win .mt-rem{
  background:var(--pp-ctl, #f7f7f7) !important; color:var(--pp-ctl-txt, #000) !important;
  border:1px solid var(--pp-line, #000) !important; border-radius:0 !important;
  padding:4px 12px !important; font:400 13px 'Montserrat', Arial, sans-serif !important; cursor:pointer;
  min-height:32px; width:auto !important;
}
html#pp#pp body .ppf-win .mt-here{ padding:2px 8px !important; }
html#pp#pp body .ppf-win .mt-submit:disabled{ opacity:.6; cursor:wait; }
html#pp#pp body .ppf-win .mt-msg{ min-height:1em; color:var(--pp-ok-txt, #2c7a21); font-size:13px; }
html#pp#pp body .ppf-win .mt-msg.bad{ color:var(--pp-err, #b73c3c); }
html#pp#pp body .ppf-win .mt-coord{ width:12em; }
html#pp#pp body .ppf-win .mt-table-wrap{ max-height:320px; overflow:auto; margin-top:6px; }
html#pp#pp body .ppf-win .mt-table{ border-collapse:collapse; width:100%; font-size:12.5px; }
html#pp#pp body .ppf-win .mt-table th,
html#pp#pp body .ppf-win .mt-table td{ border:1px solid var(--pp-sep, #b1b1b2); padding:3px 6px; text-align:left; vertical-align:top; overflow-wrap:anywhere; }
html#pp#pp body .ppf-win .mt-table th{ background:var(--pp-row-hi, #e7e7e7); }
html#pp#pp body .ppf-win .mt-copy{ cursor:pointer; text-decoration:underline dotted; }
html#pp#pp body .ppf-win .mt-tag{ font-size:11px; padding:0 6px; border:1px solid var(--pp-sep, #b1b1b2); background:var(--pp-badge, #c1c1c1); color:var(--pp-badge-txt, #191919); }
html#pp#pp body .ppf-win .mt-mod{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }

/* Ayar etkileri */
html#pp#pp body.pf-hide-mvm #zbtn{ display:none !important; }
html#pp#pp body.pf-compact-pal #ptoolbar .psw{ width:22px !important; height:22px !important; min-width:22px !important; min-height:22px !important; }
html#pp#pp body.pf-potato *, html#pp#pp body.pf-potato *::before, html#pp#pp body.pf-potato *::after{
  animation:none !important; transition:none !important;
}
html#pp#pp body.pf-ppf-cursor #c{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 1v8M12 15v8M1 12h8M15 12h8' stroke='%23000' stroke-width='3'/%3E%3Cpath d='M12 1v8M12 15v8M1 12h8M15 12h8' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E") 12 12, crosshair !important;
}

@media (max-width:768px), (pointer:coarse) and (max-height:500px){
  .ppf-ov{ padding:0; align-items:flex-end; }
  html#pp#pp body .ppf-win, html#pp#pp body .ppf-win.ppf-win-wide{ width:100%; max-height:88vh; }
  html#pp#pp body .ppf-win-x{ width:32px !important; height:32px !important; min-width:32px !important; min-height:32px !important; }
  html#pp#pp body .ppf-win .settings-checkbox{ width:24px; height:24px; }
  html#pp#pp body .ppf-win .modallink{ padding:6px 8px; }
  html#pp#pp body .ppf-win .mt-coord{ width:9.5em; }
}

/* ── v5.15: eski girişler kalktı ─────────────────────────────────
   Profilin Ayarlar sekmesi → Ayarlar penceresi (ppf-settings.js).
   Admin düğmesi/paneli ve kurucu düğmesi → Modtools (modtools.js).
   İşlevler yerinde; yalnız giriş kapıları gizli. */
html#pp#pp body #pctab-ayarlar,
html#pp#pp body #pcpanel-ayarlar,
html#pp#pp body #adminbtn,
html#pp#pp body #ts-adminbtn,
html#pp#pp body #ownerbtn,
html#pp#pp body #ts-ownerbtn,
html#pp#pp body #paint-toolbar{ display:none !important; }

/* Açık yetkili aracı şeridi (Modtools > Araçlar) */
html#pp#pp body .ppf-win.mt-strip{
  position:fixed; left:50%; bottom:76px; transform:translateX(-50%);
  width:auto; max-width:calc(100vw - 32px); z-index:2147481000;
  flex-direction:row; align-items:center; gap:10px; padding:6px 8px 6px 12px;
  background:var(--pp-wait-bg, #fff6d6); color:var(--pp-wait-txt, #7a5c00);
}

/* ── Eski yetkili pencereleri Modtools görünümünde ───────────────
   Kart > başlık (rozet + yazı, ✕) > içerik düzeni; sınıfsız satır içi
   stiller. Başlık gri şerit, rozet gizli, ✕ küçük kare. */
html#pp#pp body :is(#au-modal, #bans-modal, #adminfac-modal, #reports-modal, #owner-modal,
  #pixel-event-modal, #announce-modal, #region-modal, #rollback-modal) > div{
  border-radius:0 !important; border:1px solid var(--pp-line, #000) !important;
  background:var(--pp-win, #fcfcfc) !important; color:var(--pp-txt, #000) !important;
  box-shadow:none !important; padding:0 0 12px !important; overflow:auto !important;
  font-family:'Montserrat', Arial, sans-serif !important;
}
html#pp#pp body :is(#au-modal, #bans-modal, #adminfac-modal, #reports-modal, #owner-modal,
  #pixel-event-modal, #announce-modal) > div > div:first-child{
  display:flex !important; align-items:center !important; gap:8px !important;
  margin:0 0 10px !important; padding:4px 6px 4px 12px !important;
  background:var(--pp-ctl-sel, #e8e8e8) !important; border:0 !important;
  border-bottom:1px solid var(--pp-line, #000) !important; border-radius:0 !important;
}
html#pp#pp body :is(#au-modal, #bans-modal, #adminfac-modal, #reports-modal, #owner-modal,
  #pixel-event-modal, #announce-modal) > div > div:first-child > div > :first-child:not(:last-child){ display:none !important; }
html#pp#pp body :is(#au-modal, #bans-modal, #adminfac-modal, #reports-modal, #owner-modal,
  #pixel-event-modal, #announce-modal) > div > div:first-child *{
  font-size:15px !important; font-weight:700 !important; color:var(--pp-txt, #000) !important;
  -webkit-text-fill-color:currentColor !important; background-image:none !important;
}
html#pp#pp body :is(#au-modal, #bans-modal, #adminfac-modal, #reports-modal, #owner-modal,
  #pixel-event-modal, #announce-modal) > div > div:first-child > button,
html#pp#pp body :is(#tplmod-modal) .tm-x,
html#pp#pp body :is(#tqa-modal, #apl-modal, #apt-modal, #apst-modal) .tqr-close{
  width:28px !important; height:28px !important; min-width:28px !important; min-height:28px !important;
  padding:0 !important; margin-left:auto !important; border-radius:0 !important;
  border:1px solid var(--pp-line, #000) !important; background:var(--pp-ctl, #f7f7f7) !important;
  color:var(--pp-txt, #000) !important; font-size:14px !important;
}
html#pp#pp body :is(#au-modal, #bans-modal, #adminfac-modal, #reports-modal, #owner-modal,
  #pixel-event-modal, #announce-modal) > div > :not(:first-child){
  margin-left:14px !important; margin-right:14px !important;
}
/* tm-* (şablon modları / eser şikâyetleri) ve tqr-* (talepler, korumalar, yapıştır) */
html#pp#pp body #tplmod-modal .tm-card,
html#pp#pp body :is(#tqa-modal, #apl-modal, #apt-modal, #apst-modal) .tqr-card{
  border-radius:0 !important; border:1px solid var(--pp-line, #000) !important;
  background:var(--pp-win, #fcfcfc) !important; box-shadow:none !important;
  padding:0 14px 12px !important; position:relative !important;
}
html#pp#pp body #tplmod-modal .tm-head,
html#pp#pp body :is(#tqa-modal, #apl-modal, #apt-modal, #apst-modal) .tqr-title{
  margin:0 -14px 10px !important; padding:6px 44px 6px 12px !important;
  background:var(--pp-ctl-sel, #e8e8e8) !important; border-bottom:1px solid var(--pp-line, #000) !important;
  font-size:15px !important; font-weight:700 !important; color:var(--pp-txt, #000) !important;
}
html#pp#pp body :is(#tqa-modal, #apl-modal, #apt-modal, #apst-modal) .tqr-close{
  position:absolute !important; top:3px !important; right:6px !important;
}

/* ── v5.18: pixelplanet .cooldownbox + .notifybox (default.css birebir) ──
   Eski "N / 15 piksel" sayacı (#pixel-widget) ve profil kutusundaki
   piksel sayısı kalktı: pixelplanet kalan piksel göstermez, toplam
   beklemeyi gösterir (game.js pfCoolDownBox / pfNotify). */
html#pp#pp body #pixel-widget,
html#pp#pp body #pb-pix{ display:none !important; }
html#pp#pp body .cooldownbox,
html#pp#pp body .notifybox{
  position:fixed; left:0; right:0; margin-left:auto; margin-right:auto;
  border:1px solid #000; color:#000; text-align:center;
  font:400 16px 'Montserrat', Arial, sans-serif; pointer-events:none;
  visibility:hidden; opacity:0; box-sizing:content-box;
}
html#pp#pp body .cooldownbox{
  top:16px; width:48px; height:36px; line-height:36px; padding:0 16px;
  background:var(--pp-box, rgba(226,226,226,.8)); color:var(--pp-txt, #000);
  z-index:60; transition:visibility .3s, opacity .3s linear;
}
html#pp#pp body .notifybox{
  top:57px; width:98px; min-height:30px; line-height:30px; font-size:14px;
  background:rgba(199,206,36,.8); z-index:61; transition:visibility .5s, opacity .5s linear;
}
html#pp#pp body .notifybox.green,
html#pp#pp body .notifybox.red{ width:68px; }
html#pp#pp body .notifybox.green{ background:#a9ffb0cc; }
html#pp#pp body .notifybox.red{ background:#ffa9a9cc; }
html#pp#pp body .cooldownbox.show,
html#pp#pp body .notifybox.show{ visibility:visible; opacity:1; }

/* ── v5.21: sohbet sağ tık menüsü (pixelplanet .menu / .menuelement) ── */
html#pp#pp body .chat-ctx{
  position:fixed; z-index:2147483000; min-width:180px;
  background:var(--pp-menu, rgba(226,226,226,.95)); color:var(--pp-txt, #000);
  border:1px solid var(--pp-line, #000); box-shadow:0 0 2px 2px rgba(0,0,0,.2);
  font:400 13px 'Montserrat', Arial, sans-serif;
}
html#pp#pp body .chat-ctx .menuelement{
  display:flex; align-items:center; gap:6px; padding:8px 10px; cursor:pointer;
  border-top:1px solid var(--pp-sep, #b1b1b2); min-height:32px; box-sizing:border-box;
}
html#pp#pp body .chat-ctx .menuelement:first-child{ border-top:0; }
html#pp#pp body .chat-ctx .menuelement:hover,
html#pp#pp body .chat-ctx .menuelement:focus{ background:var(--pp-ctl-sel, #e8e8e8); outline:none; }
html#pp#pp body .chat-ctx .menuicon{ display:flex; width:16px; justify-content:center; }

/* ── v5.22: HoI4 tarzı diplomasi paneli (diplomacy-panel.js) ─────────
   Soldan sağa kayarak açılır; koyu çelik zemin, altın çerçeve. */
html#pp#pp body #dp-panel{
  position:fixed; left:0; top:140px; z-index:2147480000;
  width:min(300px, 86vw); max-height:calc(100vh - 160px); overflow:auto;
  background:linear-gradient(180deg, #2a2f38 0%, #1b1f26 100%); color:#e9e4d4;
  border:2px solid #b8954a; border-left:0; box-shadow:4px 6px 18px rgba(0,0,0,.55);
  transform:translateX(-110%); opacity:.4;
  transition:transform .38s cubic-bezier(.2,.85,.25,1), opacity .38s ease;
}
html#pp#pp body #dp-panel.acik{ transform:translateX(0); opacity:1; }
html#pp#pp body #dp-panel .dp-bas{
  display:flex; align-items:center; gap:10px; padding:10px 10px 10px 12px;
  background:linear-gradient(180deg, #3a3326, #2a2519); border-bottom:2px solid #b8954a;
}
html#pp#pp body #dp-panel .dp-bayrak{ width:54px; height:36px; object-fit:cover; border:1px solid #000; box-shadow:0 0 0 1px #b8954a; flex-shrink:0; }
html#pp#pp body #dp-panel .dp-ad{ flex:1; font-weight:700; font-size:16px; line-height:1.2; color:#f3dfa3; }
html#pp#pp body #dp-panel .dp-x{
  width:28px !important; height:28px !important; min-width:28px !important; padding:0 !important;
  background:#1b1f26 !important; color:#f3dfa3 !important; border:1px solid #b8954a !important;
  border-radius:0 !important; cursor:pointer; font-size:14px !important;
}
html#pp#pp body #dp-panel .dp-govde{ padding:8px 12px 14px; }
html#pp#pp body #dp-panel .dp-bolum{
  margin:10px 0 6px; font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:#b8954a;
  border-bottom:1px solid rgba(184,149,74,.35); padding-bottom:3px;
}
html#pp#pp body #dp-panel .dp-lider{ display:flex; align-items:center; gap:8px; font-size:15px; font-weight:700; color:#fff; }
html#pp#pp body #dp-panel .dp-lider svg{ color:#f3c64a; width:16px; height:16px; }
html#pp#pp body #dp-panel .dp-lider i{ font-weight:400; color:#a9a28f; }
html#pp#pp body #dp-panel .dp-liste{ list-style:none; margin:0; padding:0; }
html#pp#pp body #dp-panel .dp-liste li{
  display:flex; align-items:center; gap:8px; padding:5px 6px; font-size:14px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
html#pp#pp body #dp-panel .dp-liste li:nth-child(1) .dp-sira{ background:#c9a227; color:#1b1f26; }
html#pp#pp body #dp-panel .dp-liste li:nth-child(2) .dp-sira{ background:#b9c0c8; color:#1b1f26; }
html#pp#pp body #dp-panel .dp-liste li:nth-child(3) .dp-sira{ background:#b4763a; color:#1b1f26; }
html#pp#pp body #dp-panel .dp-sira{
  width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center;
  background:#3a3f4a; color:#e9e4d4; font-weight:700; font-size:12px; flex-shrink:0;
}
html#pp#pp body #dp-panel .dp-kim{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html#pp#pp body #dp-panel .dp-px{ font-weight:700; color:#f3dfa3; }
html#pp#pp body #dp-panel .dp-bos, html#pp#pp body #dp-panel .dp-yukleniyor{ color:#a9a28f; font-size:13px; padding:6px 0; }
@media (prefers-reduced-motion:reduce){ html#pp#pp body #dp-panel{ transition:none; } }

/* ── v5.23: Geçmiş görünüm kutusu (pixelplanet .historyselect / #historyselectfloat) ── */
html#pp#pp body #historyselectfloat{ position:fixed; top:16px; left:0; right:0; z-index:62; pointer-events:none; }
html#pp#pp body .historyselect{
  pointer-events:auto; height:70px; width:140px; box-sizing:content-box;
  background:var(--pp-box, rgba(226,226,226,.8)); color:var(--pp-txt, #000);
  font:400 14px/26px 'Montserrat', Arial, sans-serif; text-align:center;
  border:1px solid var(--pp-line, #000); padding:0 24px; margin-left:auto; margin-right:auto;
}
html#pp#pp body .historyselect input[type="date"]{ width:100%; margin-top:6px; font:400 13px 'Montserrat', Arial, sans-serif; background:var(--pp-in-bg, #fff); color:var(--pp-in-txt, #000); border:1px solid var(--pp-in-bd, #ccc); box-sizing:border-box; }
html#pp#pp body .historyselect p{ margin:4px 0 0; font-size:13px; }
html#pp#pp body .historyselect .hsar{
  padding:0 !important; width:24px !important; min-width:24px !important; height:24px !important; min-height:24px !important;
  background:var(--pp-ctl, #f7f7f7) !important; color:var(--pp-ctl-txt, #000) !important; border:1px solid var(--pp-line, #000) !important;
  border-radius:0 !important; cursor:pointer; font-size:14px !important; line-height:1 !important;
}
html#pp#pp body .historyselect select{ margin:4px 4px 0; font:400 13px 'Montserrat', Arial, sans-serif; background:var(--pp-in-bg, #fff); color:var(--pp-in-txt, #000); border:1px solid var(--pp-in-bd, #ccc); }
/* Geçmişte piksel basılmaz: bekleme kutuları aynı yerde, gizle */
html#pp#pp body.pf-historical .cooldownbox,
html#pp#pp body.pf-historical .notifybox{ display:none !important; }
@media (max-width:768px), (pointer:coarse) and (max-height:500px){
  html#pp#pp body #historyselectfloat{ top:56px; }
  html#pp#pp body .historyselect .hsar{ width:32px !important; min-width:32px !important; height:32px !important; min-height:32px !important; }
  html#pp#pp body .historyselect{ height:auto; padding:0 12px 6px; width:170px; }
}
