/**
 * Wine Cellar — partial-amount picker + grid fill bar styles (R10.2 F6)
 */

/* ── Amount picker radio row ──────────────────────────────────── */
.amount-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs, 0.25rem);
}

.amount-picker-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 0.5rem);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border, #444);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text, #eee);
  transition: border-color 0.15s, background 0.15s;
}

.amount-picker-option:hover {
  background: var(--bg-slot-hover, rgba(255, 255, 255, 0.04));
}

.amount-picker-option.is-selected {
  border-color: var(--accent, #B0A080);
  background: rgba(176, 160, 128, 0.08);
}

.amount-picker-radio {
  accent-color: var(--accent, #B0A080);
}

.amount-picker-label {
  flex: 1;
}

.amount-picker-custom-input {
  width: 60px;
  background: var(--bg-card, #252525);
  color: var(--text, #eee);
  border: 1px solid var(--border, #444);
  border-radius: var(--radius-sm, 4px);
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.amount-picker-custom-input.is-invalid {
  border-color: var(--red, #e74c3c);
}

.amount-picker-custom-input:disabled {
  opacity: 0.4;
}

.amount-picker-hint {
  font-size: 0.7rem;
  margin-top: var(--space-xs, 0.25rem);
}

/* ── Grid fill bar (semantic <progress>) ──────────────────────── */
.slot-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border: none;
  border-radius: 0 0 4px 4px;
  appearance: none;
  -webkit-appearance: none;
}

/* Webkit (Chrome, Safari, Edge) */
.slot-fill::-webkit-progress-bar {
  background: var(--bg-slot-hover, rgba(255, 255, 255, 0.06));
  border-radius: 0 0 4px 4px;
}

.slot-fill::-webkit-progress-value {
  background: var(--accent, #B0A080);
  border-radius: 0 0 4px 4px;
  transition: width 0.3s ease;
}

/* Firefox */
.slot-fill::-moz-progress-bar {
  background: var(--accent, #B0A080);
  border-radius: 0 0 4px 4px;
}

/* Red accent when < 10% remaining */
.slot-fill[value="0"]::-webkit-progress-value,
.slot-fill[value="1"]::-webkit-progress-value {
  background: var(--red, #e74c3c);
}

/* Hide on very small slots (< 60px wide) */
@media (max-width: 320px) {
  .slot-fill {
    display: none;
  }
}
