/* Título + Voltar na mesma linha (também no mobile) */
.agendar-title-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  width: 100%;
}

.agendar-title-row .agendar-title-text {
  flex: 0 1 auto;
  white-space: nowrap;
}

.agendar-title-row .agendar-voltar-btn,
.agendar-title-row .agendar-header-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1;
  padding: 0.25rem 0.45rem;
  min-height: 0 !important;
  width: auto;
  max-width: 2.25rem;
}

.agendar-voltar-btn i,
.agendar-header-btn i {
  font-size: 0.8rem;
}

.agendar-title-sub {
  text-align: center;
}

@media (min-width: 768px) {
  .agendar-title-row {
    justify-content: center;
    text-align: center;
  }
}

/* Steps do agendar — mobile e desktop */
.agendar-mobile-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin: 0.25rem 0 1.25rem;
  padding: 0.65rem 0.85rem;
  list-style: none;
  background: #f7f8fc;
  border-radius: 0.85rem;
}

.agendar-mobile-steps li {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  color: #8898aa;
  position: relative;
  padding: 0 0.15rem;
}

.agendar-mobile-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.72rem;
  left: calc(50% + 0.95rem);
  width: calc(100% - 1.9rem);
  height: 1px;
  background: #e3e8ef;
  pointer-events: none;
}

.agendar-mobile-steps li.is-done:not(:last-child)::after,
.agendar-mobile-steps li.is-active:not(:last-child)::after {
  background: rgba(94, 114, 228, 0.45);
}

.agendar-mobile-steps li::before {
  content: attr(data-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #8898aa;
  background: #fff;
  border: 1.5px solid #dfe3ea;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.agendar-mobile-steps li.is-active,
.agendar-mobile-steps li.is-done {
  color: #5e72e4;
}

.agendar-mobile-steps li.is-active::before {
  color: #fff;
  background: #5e72e4;
  border-color: #5e72e4;
}

.agendar-mobile-steps li.is-done::before {
  content: "✓";
  color: #fff;
  background: #5e72e4;
  border-color: #5e72e4;
  font-size: 0.68rem;
}

@media (min-width: 768px) {
  .agendar-mobile-steps {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.85rem 1.1rem;
  }

  .agendar-mobile-steps li {
    font-size: 0.78rem;
    gap: 0.5rem;
  }

  .agendar-mobile-steps li::before {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
  }

  .agendar-mobile-steps li:not(:last-child)::after {
    top: 0.82rem;
    left: calc(50% + 1.05rem);
    width: calc(100% - 2.1rem);
  }
}

@media (max-width: 767.98px) {
  .agendar-title-row {
    justify-content: center;
    text-align: center;
  }

  .agendar-mobile-shell .card.card-profile {
    display: none;
  }

  .agendar-mobile-shell .card {
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .agendar-mobile-shell .card-header {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .agendar-mobile-shell .card-body {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .agendar-mobile-shell .card-body.px-4,
  .agendar-mobile-shell .card-body.px-md-5 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .agendar-mobile-shell .list-group-item {
    min-height: 52px;
    border-radius: 0.75rem !important;
    margin-bottom: 0.45rem;
  }

  .agendar-mobile-shell .btn-primary:not(.agendar-voltar-btn),
  .agendar-mobile-shell .btn-success {
    min-height: 48px;
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
  }

  .agendar-mobile-shell .agendar-voltar-btn {
    width: auto !important;
    max-width: 2.25rem;
    min-height: 0 !important;
    min-width: 2rem;
  }

  .agendar-mobile-shell input[type="date"],
  .agendar-mobile-shell input[type="time"],
  .agendar-mobile-shell select.form-control {
    min-height: 48px;
    font-size: 16px;
  }

  /* Pull-to-refresh indicator (lista) */
  .ptr-indicator {
    height: 0;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: #5e72e4;
    font-size: 0.8rem;
    font-weight: 600;
    transition: height 0.15s ease;
  }

  .ptr-indicator.is-visible {
    height: 2.5rem;
    padding-bottom: 0.35rem;
  }
}
