/* ── Editör araç çubuğu: "..." menüsü (aşağı açılır) ── */
.pv-tb-more-dd {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(12, 12, 12, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px;
  min-width: 190px;
  display: none;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .06);
  z-index: 2100;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: pmIn .15s ease;
}

.pv-tb-more-dd.on {
  display: block
}

.pv-tb-more-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #ccc;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.pv-tb-more-item:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff
}

.pv-tb-more-item .material-symbols-outlined {
  font-size: 15px;
  flex-shrink: 0
}

.pv-tb-more-item .tog-btn-mini {
  margin-left: auto;
  width: 26px;
  height: 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  position: relative;
  flex-shrink: 0;
}

.pv-tb-more-item .tog-btn-mini::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #888;
  transition: all .15s;
}

.pv-tb-more-item .tog-btn-mini.on {
  background: rgba(76, 175, 80, .35)
}

.pv-tb-more-item .tog-btn-mini.on::after {
  left: 13px;
  background: #4caf50
}

.pv-tb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
}

.mode-dd {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  left: auto;
  background: rgba(12, 12, 12, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 6px;
  min-width: 230px;
  display: none;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .06);
  z-index: 2100;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: pmIn .15s ease;
  isolation: isolate;
}

.mode-dd.on {
  display: block
}

.mdd-item {
  padding: 11px 13px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .18s
}

.mdd-item:hover {
  background: var(--sf)
}

.mdd-item.sel {
  background: var(--sf);
  border: 1px solid var(--bd2)
}

.mdd-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
  display: flex;
  align-items: center;
  gap: 7px
}

.mdd-desc {
  font-size: 11px;
  color: var(--dm);
  margin-top: 3px;
  line-height: 1.5
}

.mdd-divider {
  height: 1px;
  background: var(--bd);
  margin: 5px 4px
}

.mdd-think-row {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.mdd-think-toggle {
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: var(--bd2);
  position: relative;
  transition: background .2s;
  flex-shrink: 0
}

.mdd-think-toggle::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mu);
  transition: all .2s
}

.mdd-think-toggle.on {
  background: var(--sb)
}

.mdd-think-toggle.on::after {
  left: 17px;
  background: #fff
}

.cd-bar {
  height: 2px;
  background: var(--bd);
  position: relative;
  overflow: hidden;
  flex-shrink: 0
}

.cd-fill {
  height: 100%;
  background: var(--aa);
  background-size: 200% 100%;
  width: 0%;
  transition: width .1s linear;
  animation: gradSlide 2.5s linear infinite
}

@keyframes gradSlide {
  0% {
    background-position: 0% 50%
  }

  100% {
    background-position: 200% 50%
  }
}

.drag-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 102, 196, .05);
  border: 2px dashed rgba(255, 102, 196, .55);
  z-index: 400;
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--aa);
  font-weight: 600;
  pointer-events: none;
  backdrop-filter: blur(6px);
  animation: dragPulse 1.3s ease infinite
}

@keyframes dragPulse {

  0%,
  100% {
    border-color: rgba(255, 102, 196, .4)
  }

  50% {
    border-color: rgba(255, 102, 196, .95)
  }
}

.drag-overlay.on {
  display: flex
}

.chat-split {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden
}

.ca {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: #282828 transparent
}

::-webkit-scrollbar {
  width: 3px
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 2px
}

.pv-resize-handle {
  width: 0;
  flex-shrink: 0;
  cursor: col-resize;
  background: transparent;
  position: relative;
  display: none;
  z-index: 5;
  touch-action: none
}

.pv-resize-handle.visible {
  display: block;
  width: 12px
}

.pv-resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 36px;
  background: var(--bd2);
  border-radius: 99px;
  opacity: 0;
  transition: opacity .2s
}

.pv-resize-handle:hover::after,
.pv-resize-handle.dragging::after {
  opacity: 1
}

.pv-resize-handle.dragging {
  background: rgba(255, 255, 255, .03)
}

.preview-panel {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-left: none;
  background: var(--sf);
  transition: width .35s cubic-bezier(.4, 0, .2, 1), min-width .35s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column
}

.preview-panel.on {
  width: 45%;
  min-width: 320px;
  border-left: 1px solid var(--bd)
}

.pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0
}

.pv-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--mu)
}

.pv-close {
  background: none;
  border: none;
  color: var(--dm);
  cursor: pointer;
  padding: 5px;
  border-radius: 7px;
  display: flex;
  transition: all .18s
}

.pv-close:hover {
  background: var(--sf2);
  color: var(--tx)
}

.pv-iframe {
  flex: 1;
  border: none;
  background: #fff
}

.pv-tabs {
  display: flex;
  gap: 4px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0
}

/* ── VS Code tarzı dosya gezgini ── */
.pv-explorer {
  width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #030303;
  border-right: 1px solid var(--ed-border);
  overflow: hidden;
}

.pv-explorer.collapsed {
  display: none;
}

.pv-exp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  padding: 0 6px 0 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--ed-border);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ed-fg-dim);
}

.pv-exp-actions {
  display: flex;
  gap: 2px;
}

.pv-exp-actions button {
  background: none;
  border: none;
  color: var(--ed-fg-dim);
  cursor: pointer;
  font-size: 11px;
  padding: 3px 5px;
  border-radius: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-exp-actions button:hover {
  background: var(--ed-bg);
  color: var(--ed-fg);
}

.pv-exp-tree {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--ed-fg);
  scrollbar-width: thin;
}

/* Kod editörü textarea'sının scrollbar'ı GİZLİ (kaydırma çalışır) — üstündeki
   syntax-highlight pre katmanıyla aynı genişlikte kalsın, yoksa wrap'te metin kayar */
#pv-code-edit::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.pv-exp-row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding-right: 4px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

.pv-exp-row:hover {
  background: var(--ed-bg);
}

.pv-exp-row.active {
  background: var(--ed-active-line, rgba(120, 120, 255, .12));
  color: #fff;
}

.pv-exp-row.seldir {
  outline: 1px dashed var(--ed-border);
  outline-offset: -2px;
}

.pv-exp-caret {
  width: 12px;
  display: inline-block;
  text-align: center;
  color: var(--ed-fg-dim);
  font-size: 10px;
}

.pv-exp-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-exp-row-actions {
  display: none;
  gap: 1px;
  flex-shrink: 0;
}

.pv-exp-row:hover .pv-exp-row-actions {
  display: flex;
}

.pv-exp-row-actions button {
  background: none;
  border: none;
  color: var(--ed-fg-dim);
  cursor: pointer;
  font-size: 10px;
  padding: 2px 3px;
  border-radius: 3px;
  line-height: 1;
}

.pv-exp-row-actions button:hover {
  background: var(--ed-border);
  color: #fff;
}

.pv-exp-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  flex-shrink: 0;
  background: var(--ed-bg2);
  border: none;
  border-right: 1px solid var(--ed-border);
  color: var(--ed-fg-dim);
  cursor: pointer;
  font-size: 13px;
}

.pv-explorer.collapsed+.pv-exp-toggle {
  display: flex;
}

/* Sürüklenirken */
.pv-exp-row[draggable="true"]:active {
  opacity: .6;
}

/* Sağ-tık menü */
.efs-ctx {
  position: fixed;
  z-index: 100000;
  min-width: 168px;
  background: var(--ed-bg2, #252526);
  border: 1px solid var(--ed-border, #3a3a3a);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
}

.efs-ctx button {
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--ed-fg, #ddd);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 5px;
}

.efs-ctx button:hover {
  background: var(--ed-active-line, rgba(120, 120, 255, .15));
  color: #fff;
}

/* ── Çoklu seçim & sürükleme vurgusu ── */
.pv-exp-row.selected {
  background: rgba(59, 130, 246, .18);
  outline: 1px solid rgba(59, 130, 246, .55);
  outline-offset: -1px;
}

.pv-exp-row.drag-over,
.pv-exp-tree.drag-over {
  background: rgba(59, 130, 246, .22) !important;
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

.pv-exp-selbar {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--ed-border);
  background: rgba(59, 130, 246, .08);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--ed-fg);
  flex-shrink: 0;
}

.pv-exp-sel-count {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-exp-selbar button {
  background: none;
  border: none;
  color: var(--ed-fg-dim);
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-exp-selbar button:hover {
  background: var(--ed-bg);
  color: #fff;
}

/* ── pv-exp-actions, pv-tb-btn ile aynı görünüm ── */
.pv-exp-actions button {
  width: 28px;
  height: 24px;
  border: 1px solid var(--ed-border);
  border-radius: 4px;
  background: var(--ed-bg);
}

.pv-exp-actions button:hover {
  background: var(--ed-active-line, rgba(120, 120, 255, .15));
  border-color: var(--ed-fg-dim);
}

.pv-exp-actions #efs-delall-btn:hover {
  background: rgba(244, 67, 54, .22);
  border-color: rgba(244, 67, 54, .5);
  color: #ff6b6b;
}

/* ── Gezgin genişlik tutamacı ── */
.pv-explorer {
  position: relative;
}

.pv-exp-resize {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 6;
  touch-action: none;
}

.pv-exp-resize:hover,
.pv-exp-resize.dragging {
  background: rgba(59, 130, 246, .4);
}

/* ── VS Code tarzı dosya sekmeleri ── */
.pv-tabs-strip {
  display: none;
  overflow-x: auto;
  background: var(--ed-bg2, #1e1e1e);
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
  scrollbar-width: none;
}

.pv-tabs-strip::-webkit-scrollbar {
  display: none;
}

.pv-tab-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 10px;
  height: 32px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--ed-fg-dim);
  border-right: 1px solid var(--ed-border);
  border-top: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.pv-tab-item.active {
  background: var(--ed-bg);
  color: var(--ed-fg);
  border-top-color: #3b82f6;
}

.pv-tab-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-tab-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 3px;
}

.pv-tab-close:hover {
  background: var(--ed-border);
  color: #fff;
}
