/**
 * material-optimization.html — Materyal durum simülatörü.
 * Uzay siyahı gradient + cam (glassmorphism); atlas simünden ayrı soğuk ton paleti.
 */

.doc-mat-state-sim {
  position: relative;
  margin: 1.35rem 0 0.25rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(100, 140, 200, 0.28);
  background: linear-gradient(
    152deg,
    rgba(6, 10, 22, 0.62) 0%,
    rgba(4, 8, 18, 0.58) 38%,
    rgba(8, 12, 28, 0.64) 72%,
    rgba(3, 6, 16, 0.66) 100%
  );
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(120, 180, 255, 0.05) inset,
    0 22px 56px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(30, 80, 140, 0.12);
  overflow: hidden;
}

.doc-mat-state-sim::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    120% 80% at 12% -10%,
    rgba(80, 140, 220, 0.14) 0%,
    transparent 55%
  );
}

.doc-mat-state-sim > * {
  position: relative;
  z-index: 1;
}

.doc-mat-state-sim__caption {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(175, 195, 225, 0.9);
}

.doc-mat-state-sim__caption strong {
  color: rgba(130, 210, 255, 0.95);
  font-weight: 600;
}

.doc-mat-state-sim__badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(8, 14, 28, 0.96);
  background: linear-gradient(120deg, rgba(80, 200, 255, 0.88), rgba(140, 160, 255, 0.9));
}

.doc-mat-state-sim__controls {
  display: grid;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}

@media (min-width: 800px) {
  .doc-mat-state-sim__controls {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  /* Slider sütunu dar kaldığında etiket kırılmasın: tam genişlik satır */
  .doc-mat-state-sim__stack {
    grid-column: 1 / -1;
  }
}

.doc-mat-state-sim__fieldset {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 4, 14, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.doc-mat-state-sim__legend {
  padding: 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(140, 175, 220, 0.9);
}

.doc-mat-state-sim__radios {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.doc-mat-state-sim__radio {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.86rem;
  color: rgba(210, 220, 240, 0.95);
}

.doc-mat-state-sim__radio input {
  accent-color: #5ec8ff;
}

.doc-mat-state-sim__toggles {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.doc-mat-state-sim__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.86rem;
  color: rgba(205, 215, 235, 0.95);
}

.doc-mat-state-sim__toggle input {
  accent-color: #8cb4ff;
}

.doc-mat-state-sim__stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

/* Slider etiketleri: Türkçe cümle; uppercase yok — dar sütunda kırılmayı önler */
.doc-mat-state-sim__label--slider {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(185, 200, 230, 0.95);
  gap: 0.45rem;
}

.doc-mat-state-sim__label-head {
  display: block;
  line-height: 1.4;
  max-width: 100%;
}

.doc-mat-state-sim__label-primary {
  display: inline;
  font-weight: 600;
}

.doc-mat-state-sim__label-secondary {
  display: inline;
  margin-left: 0.35rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: rgba(145, 165, 200, 0.88);
  white-space: normal;
}

.doc-mat-state-sim__label-secondary code {
  font-size: 0.85em;
}

.doc-mat-state-sim__range-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}

.doc-mat-state-sim__range {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  accent-color: #5ec8ff;
}

.doc-mat-state-sim__count-out {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  color: rgba(120, 210, 255, 0.98);
  min-width: 2.5rem;
  text-align: right;
}

.doc-mat-state-sim__highlight {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(90, 150, 220, 0.32);
  background: linear-gradient(
    135deg,
    rgba(4, 12, 28, 0.55) 0%,
    rgba(8, 14, 32, 0.5) 100%
  );
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.doc-mat-state-sim__highlight-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(130, 185, 235, 0.88);
}

.doc-mat-state-sim__highlight-val {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: rgba(160, 220, 255, 0.98);
  text-shadow: 0 0 28px rgba(80, 160, 255, 0.25);
}

.doc-mat-state-sim__highlight-note {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(155, 175, 210, 0.88);
}

.doc-mat-state-sim__highlight-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem 0.65rem;
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(100, 160, 220, 0.22);
  background: rgba(0, 8, 22, 0.4);
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(175, 200, 235, 0.92);
}

.doc-mat-state-sim__highlight-split strong {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: rgba(200, 230, 255, 0.98);
}

.doc-mat-state-sim__pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 12, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-mat-state-sim__pill--draw strong {
  color: rgba(130, 200, 255, 0.98);
}

.doc-mat-state-sim__pill--state strong {
  color: rgba(160, 220, 255, 0.98);
}

.doc-mat-state-sim__pill-hint {
  display: inline;
  margin-left: 0.25rem;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(140, 165, 200, 0.78);
}

.doc-mat-state-sim__pill-arrow {
  font-weight: 800;
  font-size: 1rem;
  color: rgba(255, 140, 160, 0.85);
  user-select: none;
}

.doc-mat-state-sim__highlight--contrast {
  border-color: rgba(120, 200, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(80, 160, 255, 0.15) inset,
    0 0 36px rgba(60, 140, 220, 0.22),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.doc-mat-state-sim__highlight--contrast .doc-mat-state-sim__highlight-val {
  text-shadow: 0 0 40px rgba(100, 200, 255, 0.35);
}

.doc-mat-state-sim__toggle--disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.doc-mat-state-sim__toggle--disabled input {
  cursor: not-allowed;
}

.doc-mat-state-sim__meters {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .doc-mat-state-sim__meters {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .doc-mat-state-sim__meters {
    grid-template-columns: repeat(5, 1fr);
  }
}

.doc-mat-state-sim__meter {
  padding: 0.65rem 0.75rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 4, 14, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.doc-mat-state-sim__meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.doc-mat-state-sim__meter-title {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(150, 175, 215, 0.88);
}

.doc-mat-state-sim__meter-val {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(235, 240, 255, 0.96);
}

.doc-mat-state-sim__meter-val--draw {
  color: rgba(120, 200, 255, 0.98);
}

.doc-mat-state-sim__meter-val--mat {
  color: rgba(150, 190, 255, 0.96);
}

.doc-mat-state-sim__meter-val--state {
  color: rgba(180, 210, 255, 0.98);
}

.doc-mat-state-sim__meter-val--cpu {
  color: rgba(110, 230, 200, 0.94);
}

.doc-mat-state-sim__meter-val--gpu {
  color: rgba(200, 170, 255, 0.96);
}

.doc-mat-state-sim__track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.doc-mat-state-sim__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  transform-origin: left center;
  transition: width 0.22s ease, background 0.2s ease;
}

.doc-mat-state-sim__fill--draw {
  background: linear-gradient(90deg, rgba(60, 140, 220, 0.35), rgba(100, 190, 255, 0.92));
}

.doc-mat-state-sim__fill--mat {
  background: linear-gradient(90deg, rgba(100, 130, 255, 0.35), rgba(140, 160, 255, 0.9));
}

.doc-mat-state-sim__fill--state {
  background: linear-gradient(90deg, rgba(80, 180, 240, 0.35), rgba(120, 210, 255, 0.9));
}

.doc-mat-state-sim__fill--cpu {
  background: linear-gradient(90deg, rgba(50, 200, 170, 0.28), rgba(90, 220, 195, 0.9));
}

.doc-mat-state-sim__fill--gpu {
  background: linear-gradient(90deg, rgba(140, 100, 240, 0.28), rgba(190, 150, 255, 0.9));
}

.doc-mat-state-sim__meter-note {
  margin: 0.35rem 0 0;
  font-size: 0.66rem;
  line-height: 1.45;
  color: rgba(130, 150, 185, 0.82);
}

.doc-mat-state-sim__cap-hint {
  margin: 0.75rem 0 0;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(160, 180, 210, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 4, 14, 0.35);
}

.doc-mat-state-sim__insight {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.78rem;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(200, 215, 240, 0.92);
  border: 1px solid rgba(100, 140, 200, 0.22);
  background: rgba(4, 10, 24, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.doc-mat-state-sim__insight strong {
  color: rgba(140, 205, 255, 0.96);
}

.doc-mat-state-sim__insight--suggest {
  margin-top: 0.55rem;
  border-color: rgba(100, 180, 220, 0.28);
  background: rgba(4, 14, 28, 0.42);
}

.doc-mat-state-sim__disclaimer {
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(120, 140, 170, 0.82);
}

@media (prefers-reduced-motion: reduce) {
  .doc-mat-state-sim__fill {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .doc-mat-state-sim,
  .doc-mat-state-sim__fieldset,
  .doc-mat-state-sim__highlight,
  .doc-mat-state-sim__meter,
  .doc-mat-state-sim__insight {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .doc-mat-state-sim {
    background: linear-gradient(
      152deg,
      rgba(8, 12, 22, 0.96) 0%,
      rgba(4, 8, 18, 0.98) 100%
    );
  }
}
