/* In-Game Appraisal System - Refined & Aligned */

.pokemon-card-top {
  display: flex;
  gap: 14px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, #f5f9fd, #ffffff);
  border-bottom: 1px solid #f1f5f9;
}

.pokemon-avatar-box {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  background: #eaf2fa;
  border: 1px solid #d3e3f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.pokemon-avatar-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.pokemon-info-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.cp-header-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.cp-prefix {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.cp-main-val {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.cp-level-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.pokemon-title-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.stars-summary-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: none;
}

.stars-row {
  display: flex;
  gap: 2px;
}

.star-icon {
  width: 13px;
  height: 13px;
  fill: #cbd5e1;
}

.star-icon.filled {
  fill: #b57314;
}

.star-icon.hundo {
  fill: #be185d;
}

.iv-pct-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #b57314;
}

.iv-total-fraction {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Appraisal Body */
.appraisal-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Aligned Stat Rows */
.appraisal-stat-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-header-aligned {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
}

.stat-name-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 65px;
}

.stat-controls-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-mini-step {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-sunken);
  border: 1px solid var(--border-hairline);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
}

.btn-mini-step:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.stat-direct-input {
  width: 34px;
  height: 24px;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.stat-direct-input::-webkit-outer-spin-button,
.stat-direct-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stat-direct-input:focus {
  border-color: var(--accent-action);
  box-shadow: 0 0 0 2px rgba(31, 111, 184, 0.15);
}

.stat-direct-input.stat-tier-green { color: #157f4e; }
.stat-direct-input.stat-tier-amber { color: #b57314; }
.stat-direct-input.stat-tier-red { color: #b3392c; }

/* 3-Group Notches Track */
.notches-track-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  height: 22px;
  position: relative;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

.notch-group {
  display: flex;
  gap: 2px;
  background: #eef2f7;
  border-radius: 6px;
  padding: 3px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  position: relative;
}

.notch-segment {
  flex: 1;
  background: #dbe2ea;
  border-radius: 2px;
  pointer-events: none;
  transition: background-color 0.05s ease;
}

.notch-segment.filled.tier-green { background: #157f4e; }
.notch-segment.filled.tier-amber { background: #b57314; }
.notch-segment.filled.tier-red { background: #b3392c; }

/* Drag Thumb Indicator */
.notch-thumb {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  margin-left: -9px;
  background: #ffffff;
  border: 2px solid #157f4e;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  z-index: 10;
  display: none;
}

.notch-thumb.tier-green { border-color: #157f4e; }
.notch-thumb.tier-amber { border-color: #b57314; }
.notch-thumb.tier-red { border-color: #b3392c; }

/* Current Pokemon Level Selector */
.level-select-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.level-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.current-level-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-action);
  background: var(--surface-sunken);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-hairline);
}

.level-presets-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.btn-level-preset {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.1s ease;
}

.btn-level-preset:hover, .btn-level-preset.active {
  background: var(--surface-sunken);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Quick Presets & Buttons */
.preset-actions-row {
  display: flex;
  gap: 6px;
  padding-top: 4px;
  flex-wrap: wrap;
}

.btn-preset-pill {
  flex: 1;
  min-width: 60px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-sunken);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.1s ease;
}

.btn-preset-pill:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

/* Nickname Generator Card - System Unicode Fallback */
.nickname-box {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nickname-text-display {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.nickname-char-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-copy-nickname {
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.1s ease;
}

.btn-copy-nickname:hover {
  background: var(--surface-sunken);
}

/* Purified IV Preview */
.purified-preview-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ecfbf9;
  border: 1px solid #bfe8e5;
  border-radius: 8px;
  font-size: 11.5px;
  color: #0b6d6a;
  margin-bottom: 10px;
}
