/* ==========================================================================
   Todix Slider — Clean Professional
   Uses --md3-slider-* CSS vars so style variants can theme the slider.
   Defaults to --accent-color / #1a1a1a when no variant is active.
   ========================================================================== */

.md3-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- +/- Buttons: minimal square --- */
.md3-slider .slider-inc-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  aspect-ratio: 1 / 1;
  border: 1.5px solid #d4d4d4;
  background: #ffffff;
  border-radius: 10px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}

.md3-slider .slider-inc-btn:hover {
  background: var(--md3-slider-thumb, var(--accent-color, #1a1a1a));
  border-color: var(--md3-slider-thumb, var(--accent-color, #1a1a1a));
  color: #ffffff;
}

.md3-slider .slider-inc-btn:active,
.md3-slider .slider-inc-btn:focus {
  background: var(--md3-slider-thumb, var(--accent-color, #333));
  border-color: var(--md3-slider-thumb, var(--accent-color, #333));
  color: #ffffff;
  outline: none;
}

.md3-slider .slider-inc-btn:disabled {
  background: #fafafa;
  color: #d4d4d4;
  cursor: not-allowed;
  border-color: #e5e5e5;
}

/* --- Track --- */
.md3-slider .styled-slider {
  flex: 1 1 auto;
  width: 240px;
  height: 4px;
  border-radius: 2px;
  background: var(--md3-slider-track, #e5e5e5);
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(
    to right,
    var(--md3-slider-track-active, var(--accent-color, #1a1a1a)) 0%,
    var(--md3-slider-track-active, var(--accent-color, #1a1a1a)) var(--progress, 0%),
    var(--md3-slider-track, #e5e5e5) var(--progress, 0%),
    var(--md3-slider-track, #e5e5e5) 100%
  );
}

.md3-slider .styled-slider:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--md3-slider-focus, rgba(26, 26, 26, 0.08));
}

/* --- Thumb: solid circle --- */
.md3-slider .styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--md3-slider-thumb, var(--accent-color, #1a1a1a));
  border: none;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.md3-slider .styled-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.md3-slider .styled-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
  box-shadow: 0 0 0 6px var(--md3-slider-focus, rgba(26, 26, 26, 0.1)), 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Firefox */
.md3-slider .styled-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--md3-slider-thumb, var(--accent-color, #1a1a1a));
  border: none;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
