/**
 * hasarteklif.com - Layer 3: İnteraktif Kaporta Hasar Krokisi & Ekspertiz Motoru Stilleri
 */

.damage-selector-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .damage-selector-container {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.25rem;
  }
}

/* 1. Sol Panel: Kroki Çerçevesi & Fırça Araç Çubuğu */
.damage-blueprint-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(217, 119, 6, 0.04), transparent 70%), var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  position: relative;
}

/* Durum Fırçası (Status Brush Toolbar) */
.damage-brush-toolbar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 1.25rem;
}

.brush-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 40px;
  padding: 0 0.65rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: var(--bg-surface);
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.brush-btn .brush-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.brush-btn[data-status="original"] .brush-dot { background-color: #10B981; }
.brush-btn[data-status="painted"]  .brush-dot { background-color: #F59E0B; }
.brush-btn[data-status="replaced"] .brush-dot { background-color: #EF4444; }
.brush-btn[data-status="local"]    .brush-dot { background-color: #06B6D4; }

.brush-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.brush-btn.is-active[data-status="original"] {
  background: rgba(16, 185, 129, 0.14);
  color: #10B981;
  border-color: #10B981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.brush-btn.is-active[data-status="painted"] {
  background: rgba(245, 158, 11, 0.14);
  color: #F59E0B;
  border-color: #F59E0B;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.brush-btn.is-active[data-status="replaced"] {
  background: rgba(239, 68, 68, 0.14);
  color: #EF4444;
  border-color: #EF4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.brush-btn.is-active[data-status="local"] {
  background: rgba(6, 182, 212, 0.14);
  color: #06B6D4;
  border-color: #06B6D4;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

/* SVG Araç Krokisi */
.damage-svg-wrapper {
  position: relative;
  width: 100%;
  max-width: 270px;
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}

.damage-svg-blueprint {
  width: 100%;
  height: auto;
  max-height: 440px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
}

/* Şasi ve Cam Elemanları (Etkileşimsiz) */
.car-chassis-bg {
  fill: var(--bg-surface);
  stroke: var(--border-subtle);
  stroke-width: 2;
}

.car-glass-accent {
  fill: rgba(148, 163, 184, 0.12);
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 1.5;
}

.car-tire {
  fill: #1E293B;
  stroke: #475569;
  stroke-width: 2;
  rx: 6px;
}

.car-mirror {
  fill: var(--bg-surface-elevated);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

/* İnteraktif Parçalar */
.damage-part {
  cursor: pointer;
  stroke-width: 2;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.damage-part:hover {
  stroke-width: 3.5;
  filter: brightness(1.15) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

/* Renk Durumları */
.damage-part.is-original {
  fill: rgba(16, 185, 129, 0.18);
  stroke: #10B981;
}

.damage-part.is-painted {
  fill: rgba(245, 158, 11, 0.32);
  stroke: #F59E0B;
}

.damage-part.is-replaced {
  fill: rgba(239, 68, 68, 0.35);
  stroke: #EF4444;
}

.damage-part.is-local {
  fill: rgba(6, 182, 212, 0.32);
  stroke: #06B6D4;
}

/* Kroki Altı Hızlı İpucu */
.damage-hint-text {
  font-size: 0.73rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* 2. Sağ Panel: Parça Listesi & Hızlı Şablonlar */
.damage-list-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Hızlı Şablon Butonları (Presets) */
.damage-presets-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.preset-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip-btn:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Parça Izgarası (Scrollable Parts List) */
.damage-parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

/* Parça Satır Kartı */
.damage-part-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.damage-part-item:hover,
.damage-part-item.is-highlighted {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.damage-part-item .part-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Parça Durum Buton Grubu (Mini Segmented Control) */
.part-status-control {
  display: inline-flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.part-opt-btn {
  border: none;
  background: transparent;
  padding: 3px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-subtle);
  transition: all 0.15s ease;
}

.part-opt-btn:hover {
  color: var(--text-main);
}

.part-opt-btn.active-original {
  background: #10B981;
  color: #ffffff;
}

.part-opt-btn.active-painted {
  background: #F59E0B;
  color: #ffffff;
}

.part-opt-btn.active-replaced {
  background: #EF4444;
  color: #ffffff;
}

.part-opt-btn.active-local {
  background: #06B6D4;
  color: #ffffff;
}

/* İstatistik Özeti Alt Barı */
.damage-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.damage-stats-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.damage-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.damage-stat-pill.pill-replaced {
  background: rgba(239, 68, 68, 0.14);
  color: #EF4444;
}

.damage-stat-pill.pill-painted {
  background: rgba(245, 158, 11, 0.14);
  color: #F59E0B;
}

.damage-stat-pill.pill-local {
  background: rgba(6, 182, 212, 0.14);
  color: #06B6D4;
}

.damage-stat-pill.pill-original {
  background: rgba(16, 185, 129, 0.14);
  color: #10B981;
}

