/* Inherit mostly from style.css :root variables */
/* Specific variables for Pet XP components can be defined here if needed */

.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  /* Padding is handled by .content in style.css */
}

.topbar {
  /* Removed - using global header */
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-primary);
  background: var(--hover-bg);
  transition: all 0.2s;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
}

.btn:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Panel Override - already styled in style.css but specific internal layout tweaks here */
.panel-title {
  margin: 0 0 15px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.hint {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-style: italic;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--hover-bg);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
}

/* Native dropdown styling support */
.field select {
  color-scheme: light dark;
  cursor: pointer;
}

.field select option {
  background: var(--sidebar-bg);
  color: var(--text-primary);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.field .hint {
  margin-top: 6px;
}

.field.small input {
  padding: 8px 10px;
  border-radius: 8px;
}

.summary {
  margin-top: 20px;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.summary-value {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-gold);
}

.summary-note {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  background: rgba(46, 160, 67, 0.1);
  padding: 8px;
  border-radius: 8px;
  border-left: 3px solid var(--accent-green);
}

.summary-split {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .summary-split {
    grid-template-columns: 1fr;
  }
}

.summary-mini {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.summary-mini .k {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.summary-mini .v {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text-primary);
}

.breakdown {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.breakdown .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  /* invisible border for spacing consistency */
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .breakdown .row {
  background: rgba(0, 0, 0, 0.03);
}

.breakdown .row .l {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.breakdown .row .r {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 15px;
}

@media (max-width: 900px) {
  .slots {
    grid-template-columns: 1fr;
  }
}

.slot {
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  transition: border-color 0.2s;
}

.slot:hover {
  border-color: var(--accent-green-glass);
}

.pet-img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.pet-img img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.slot h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
}

.slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  font-size: 0.7rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.slot-grid {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
}

@media (max-width: 520px) {
  .slot-grid {
    grid-template-columns: 1fr;
  }
}

.toysRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
}

.pill input {
  accent-color: var(--accent-green);
}

.graph-shell {
  border-radius: 20px;
  border: 2px dashed var(--border-color);
  background: rgba(0, 0, 0, 0.1);
  padding: 20px;
}

[data-theme="light"] .graph-shell {
  background: rgba(0, 0, 0, 0.02);
}

.graph-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .graph-layout {
    grid-template-columns: 1fr;
  }
}

.graph-info {
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--hover-bg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.graph-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}

.graph-stat span {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.graph-stat b {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-blue);
}

.graph-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.graph-canvas-wrap {
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  /* use strict bg for canvas contrast */
  padding: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.graph-canvas-wrap canvas {
  width: 100%;
  height: 320px;
  display: block;
}

.footnote {
  margin: 20px 0 30px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.7;
}