/* Wspólny modal krokowy. Kolory z motywu użytkownika (--bs-primary) i trybu jasny/ciemny. */
.step-wizard.modal {
  --bs-modal-margin: 1rem;
  overflow: hidden;
}

.step-wizard__dialog {
  width: min(52rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  height: auto;
  max-height: calc(100dvh - 2rem);
  margin: 1rem auto;
}

.step-wizard__content {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: calc(100dvh - 2rem);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

.step-wizard__header {
  align-items: center;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  background: var(--bs-body-bg, #fff);
}

.step-wizard__header .modal-title {
  margin: 0;
}

.step-wizard__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.step-wizard__progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.step-wizard__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-primary);
}

.step-wizard__rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.step-wizard__dot {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bs-secondary-color, #6c757d);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.35);
  background: transparent;
}

.step-wizard__dot.is-current,
.step-wizard__dot.is-done {
  color: #fff;
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}

.step-wizard__rail-line {
  width: 2.2rem;
  height: 2px;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.35);
}

.step-wizard__footer {
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  background: var(--bs-body-bg, #fff);
}

.step-wizard__wait {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
}

.step-wizard__wait:not(.d-none) {
  display: flex;
}

.step-wizard--screen .step-wizard__dialog {
  width: calc(100vw - 2rem);
  max-width: calc(100vw - 2rem);
  height: calc(100dvh - 2rem);
  max-height: calc(100dvh - 2rem);
}

.step-wizard--screen .step-wizard__content {
  height: 100%;
  max-height: 100%;
}

.integration-page-title {
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.3;
  margin: 0;
}

.connect-pick-search {
  max-width: 22rem;
  margin: 0 auto 1rem;
}

.connect-pick-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 12rem;
  color: var(--bs-secondary-color, #6c757d);
}

.connect-pick-lead {
  text-align: center;
  margin-bottom: 1rem;
}

.connect-pick-section {
  margin-bottom: 1.25rem;
}

.connect-pick-section h6 {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color, #6c757d);
  margin-bottom: 0.75rem;
}

.connect-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr));
  gap: 0.75rem;
  justify-content: center;
}

.connect-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 7.25rem;
  padding: 0.85rem 0.65rem 0.7rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.9rem;
  background: var(--bs-body-bg, #fff);
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

button.connect-pick:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.65);
  transform: translateY(-1px);
}

.connect-pick.is-selected {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.22);
}

.connect-pick.is-soon,
.connect-pick.is-disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.connect-pick.is-disabled {
  position: relative;
  opacity: 1;
  background: var(--bs-tertiary-bg, #f8f9fa);
}

.connect-pick.is-disabled .connect-pick__logo,
.connect-pick.is-disabled .connect-pick__name {
  opacity: 0.55;
}

.connect-pick__bubble {
  display: none;
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 0.4rem);
  transform: translateX(-50%);
  width: max-content;
  max-width: 16rem;
  padding: 0.45rem 0.6rem;
  background: #212529;
  color: #fff;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.18);
}

.connect-pick.is-disabled:hover .connect-pick__bubble,
.connect-pick.is-disabled:focus-within .connect-pick__bubble {
  display: block;
}

.connect-pick__logo {
  width: 100%;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connect-pick__logo img {
  max-width: 7.4rem;
  max-height: 2.6rem;
  object-fit: contain;
  background: #fff;
  border-radius: 0.35rem;
  padding: 0.15rem 0.3rem;
}

.connect-pick__icon {
  font-size: 1.65rem;
  color: var(--bs-primary);
}

.connect-pick__name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.connect-pick__soon {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color, #6c757d);
}

.connect-chosen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.connect-chosen img,
.connect-chosen .connect-pick__icon {
  max-height: 2.2rem;
  max-width: 7rem;
  object-fit: contain;
}

.marketplace-type-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.marketplace-type-logo-wrapper {
  flex: 0 0 8.5rem;
  width: 8.5rem;
  height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  background: #fff;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.7rem;
}

.marketplace-type-logo {
  display: block;
  max-width: 100%;
  max-height: 2.3rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.marketplace-type-brand__text {
  min-width: 0;
}

.marketplace-type-brand__text h6 {
  font-weight: 650;
}

.connect-provider-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 767.98px) {
  .step-wizard__dialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    margin: 0.5rem auto;
  }

  .step-wizard__content {
    max-height: calc(100dvh - 1rem);
  }
}
