/* ============================================
   250ginfo.com - Resim Düzenleyici Stilleri
   ============================================ */

/* === EDITOR APP === */
.ie-app {
  background: var(--color-dark-deep);
  border-radius: var(--border-radius);
  border: 2px solid var(--color-border);
  border-bottom: 4px solid rgba(0,0,0,0.3);
  overflow: hidden;
  display: grid;
  grid-template-columns: 56px 1fr 300px;
  grid-template-rows: auto 1fr;
  height: calc(100vh - var(--header-height) - 80px);
  min-height: 560px;
  max-height: 820px;
}

/* === TOOLBAR (Top) === */
.ie-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #0d1b0f;
  border-bottom: 2px solid rgba(139,239,81,0.15);
  flex-wrap: wrap;
}

.ie-toolbar-group {
  display: flex;
  align-items: center;
  gap: 3px;
  padding-right: 10px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.ie-toolbar-group:last-child { border-right: none; }

.ie-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.ie-toolbar-btn:hover {
  background: rgba(139,239,81,0.12);
  color: var(--color-primary);
}

.ie-toolbar-btn.active {
  background: var(--color-primary);
  color: #0d1b0f;
}

.ie-toolbar-btn .ico { font-size: 1rem; }

.ie-toolbar-spacer { flex: 1; }

.ie-file-name {
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
  padding: 3px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === LEFT TOOL STRIP === */
.ie-tools {
  background: #111e13;
  border-right: 2px solid rgba(139,239,81,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 2px;
  overflow-y: auto;
}

.ie-tool-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 1.15rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
  position: relative;
}

.ie-tool-btn:hover {
  background: rgba(139,239,81,0.12);
  color: rgba(255,255,255,0.9);
}

.ie-tool-btn.active {
  background: rgba(139,239,81,0.2);
  color: var(--color-primary);
}

.ie-tool-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 52px;
  top: 50%;
  transform: translateY(-50%);
  background: #1a2e1c;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
  border: 1px solid rgba(139,239,81,0.2);
}

.ie-tool-btn:hover::after {
  opacity: 1;
}

.ie-tools-divider {
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

/* === CANVAS AREA === */
.ie-canvas-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a140b;
  overflow: hidden;
}

.ie-canvas-container {
  position: relative;
  display: inline-block;
}

.ie-canvas-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  image-rendering: auto;
}

/* Upload overlay */
.ie-upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  cursor: pointer;
  transition: all 0.2s;
}

.ie-upload-overlay.hidden { display: none; }

.ie-upload-overlay .upload-icon {
  font-size: 3.5rem;
  opacity: 0.5;
}

.ie-upload-overlay .upload-text {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  font-weight: 600;
}

.ie-upload-overlay .upload-hint {
  color: rgba(255,255,255,0.25);
  font-size: 0.75rem;
}

.ie-upload-overlay .upload-btn-main {
  margin-top: 4px;
  padding: 10px 24px;
  background: var(--color-primary);
  color: #0d1b0f;
  font-weight: 700;
  font-size: 0.813rem;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-main);
}

.ie-upload-overlay .upload-btn-main:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
}

.ie-canvas-wrap.drag-over {
  outline: 3px dashed var(--color-primary);
  outline-offset: -3px;
}

/* Crosshair cursor when drawing */
.ie-canvas-wrap.drawing { cursor: crosshair; }
.ie-canvas-wrap.text-mode { cursor: text; }

/* === RIGHT SIDEBAR === */
.ie-sidebar {
  background: #111e13;
  border-left: 2px solid rgba(139,239,81,0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,239,81,0.2) transparent;
}

.ie-sidebar::-webkit-scrollbar { width: 5px; }
.ie-sidebar::-webkit-scrollbar-track { background: transparent; }
.ie-sidebar::-webkit-scrollbar-thumb { background: rgba(139,239,81,0.2); border-radius: 3px; }

.ie-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ie-sidebar-header h3 {
  color: #fff;
  font-size: 0.813rem;
  font-weight: 700;
}

.ie-sidebar-header .ico { font-size: 1rem; }

/* Settings panels */
.ie-panel {
  display: none;
  padding: 14px 16px;
}

.ie-panel.active { display: block; }

.ie-section-title {
  color: rgba(255,255,255,0.4);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  margin-top: 14px;
}

.ie-section-title:first-child { margin-top: 0; }

/* Slider row */
.ie-slider-row {
  margin-bottom: 12px;
}

.ie-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.ie-slider-label span {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 600;
}

.ie-slider-label .val {
  color: var(--color-primary);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

.ie-range {
  width: 100%;
  accent-color: var(--color-primary);
  margin: 0;
}

/* Reset button for sliders */
.ie-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  margin-top: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: rgba(255,255,255,0.5);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-main);
}

.ie-reset-btn:hover {
  background: rgba(255,80,80,0.1);
  border-color: rgba(255,80,80,0.3);
  color: #ff6666;
}

/* Select */
.ie-select {
  width: 100%;
  padding: 7px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 0.75rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238bef51' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 26px;
}

.ie-select:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* Input */
.ie-input {
  width: 100%;
  padding: 7px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 0.75rem;
  font-family: var(--font-main);
  transition: all 0.15s;
  box-sizing: border-box;
}

.ie-input:focus {
  border-color: var(--color-primary);
  outline: none;
}

.ie-input::placeholder { color: rgba(255,255,255,0.25); }

/* Color picker */
.ie-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ie-color-row label {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 600;
  flex: 1;
}

.ie-color-picker {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.ie-color-picker::-webkit-color-swatch-wrapper { padding: 2px; }
.ie-color-picker::-webkit-color-swatch { border-radius: 3px; border: none; }

/* Filter grid */
.ie-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ie-filter-btn {
  padding: 10px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.ie-filter-btn:hover {
  border-color: rgba(139,239,81,0.3);
  color: var(--color-primary);
  background: rgba(139,239,81,0.06);
}

.ie-filter-btn.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(139,239,81,0.12);
}

/* Brush size preview */
.ie-brush-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  margin-bottom: 10px;
}

.ie-brush-dot {
  border-radius: 50%;
  background: var(--color-primary);
  transition: all 0.15s;
}

/* Divider */
.ie-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 12px 0;
}

/* Toast */
.ie-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  background: #1a2e1c;
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-size: 0.813rem;
  font-weight: 600;
  z-index: 1000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.ie-toast.show { transform: translateY(0); opacity: 1; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .ie-app {
    grid-template-columns: 48px 1fr 260px;
  }
}

@media (max-width: 768px) {
  .ie-app {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    height: auto;
    max-height: none;
    min-height: auto;
  }

  .ie-toolbar { order: 0; }

  .ie-tools {
    order: 1;
    flex-direction: row;
    border-right: none;
    border-bottom: 2px solid rgba(139,239,81,0.1);
    overflow-x: auto;
    padding: 6px 8px;
  }

  .ie-tools-divider {
    width: 1px;
    height: 28px;
    margin: 0 4px;
  }

  .ie-tool-btn::after { display: none; }

  .ie-canvas-wrap {
    order: 2;
    min-height: 300px;
    max-height: 50vh;
  }

  .ie-sidebar {
    order: 3;
    border-left: none;
    border-top: 2px solid rgba(139,239,81,0.1);
    max-height: 350px;
  }
}
