/*
 * cr-tabs.css — Carreserve stepper styling
 *
 * Styles ONLY the 3-step stepper pills + connector line. Intentionally does
 * NOT add background / border / shadow / padding to the surrounding
 * .cr-right column or .cr-tab-panel — those keep the layout defined in
 * pages/car-reserve.css untouched.
 */

.cr-stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}

.cr-stepper::before {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 50%;
  height: 2px;
  background: var(--color-border);
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

.cr-stepper .cr-step {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  background: var(--color-bg-light);
  cursor: pointer;
}

.cr-stepper .cr-step:hover {
  border-color: var(--color-blue, #1d6fb8);
  color: var(--color-text, #1a1f24);
}

.cr-stepper .cr-step:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(29, 111, 184, .25);
}

.cr-stepper .cr-step.is-active {
  background: var(--color-blue, #1d6fb8);
  border-color: var(--color-blue, #1d6fb8);
  color: var(--color-white, #fff);
  box-shadow: 0 4px 12px rgba(29, 111, 184, .25);
}

.cr-stepper .cr-step.is-active .cr-step__num {
  color: var(--color-blue);
  background: #ffffff; 
}

.cr-stepper .cr-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-text);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 767px) {
  .cr-stepper {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }
  .cr-stepper::before { display: none; }
  .cr-stepper .cr-step {
    flex: 0 0 auto;
    padding: 12px 6px;
    font-size: 12px;
  }
  .cr-stepper .cr-step__num {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
}

.cr-stepper button,
.cr-stepper input,
.cr-stepper [class*="cr-step"] {
  transition: color 0.2s ease,
              background-color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              opacity 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .cr-stepper button,
  .cr-stepper input,
  .cr-stepper [class*="cr-step"] { transition: none; }
}
