/* Input groups */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-group label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.stepper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  overflow: hidden;
}

.stepper button {
  padding: 5px 9px;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: background 0.1s;
}

.stepper button:hover {
  background: #e9ecef;
  color: #1a1a2e;
}

.stepper input {
  flex: 1;
  text-align: center;
  background: transparent;
  border: none;
  color: #1a1a2e;
  font-size: 0.88rem;
  padding: 5px 2px;
  width: 0;
  outline: none;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* Stat tiles — solid fill, white text (the Portfolio Visualizer-style tiles) */
.stat-tile {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  min-width: 130px;
  text-align: center;
  line-height: 1.2;
}

.stat-tile-green  { background: #1db87e; }
.stat-tile-red    { background: #f06070; }

/* Soft tiles — light tinted background, colored text */
.stat-tile-soft {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  min-width: 100px;
  text-align: center;
  line-height: 1.3;
}

.stat-tile-soft-green { background: #e6f9f2; color: #15a36a; }
.stat-tile-soft-red   { background: #fdeef0; color: #e0404f; }
.stat-tile-soft-gray  { background: #f0f2f5; color: #6c757d; }

/* Tooltip */
.tooltip-wrap {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-left: 4px;
  color: #9ca3af;
}

.tooltip-wrap .tooltip-text {
  visibility: hidden;
  opacity: 0;
  background: #1f2937;
  color: #d1d5db;
  font-size: 0.7rem;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid #374151;
  border-radius: 6px;
  padding: 6px 8px;
  width: 300px;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  transition: opacity 0.15s;
  pointer-events: none;
  line-height: 1.4;
}

.tooltip-wrap:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Pin tooltip to open rightward from the icon (for left-edge columns) */
.tooltip-pin-right .tooltip-text {
  left: 0;
  transform: none;
}

/* Pin tooltip to open leftward from the icon (for right-edge columns) */
.tooltip-pin-left .tooltip-text {
  left: auto;
  right: 0;
  transform: none;
}

/* Thinking spinner */
.thinking-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e9ecef;
  border-top-color: #2c6fad;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Holdings table scrollbar */
#holdingsTable {
  padding-right: 6px;
}

#holdingsTable::-webkit-scrollbar {
  width: 5px;
}

#holdingsTable::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

#holdingsTable::-webkit-scrollbar-thumb {
  background: #c4c9d1;
  border-radius: 3px;
}

#holdingsTable::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
