/**
 * Styles for Wallex MCP Steps widget.
 * @since 2.1.0
 */

.wallex-mcp-steps {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.wallex-mcp-steps *,
.wallex-mcp-steps *::before,
.wallex-mcp-steps *::after {
  box-sizing: border-box;
}

.wallex-mcp-steps__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacingXL, 32px);
  align-items: center;
}

.wallex-mcp-steps__preview {
  display: flex;
  justify-content: center;
}

.wallex-mcp-steps__preview-card {
  width: 100%;
  max-width: 460px;
  min-height: 380px;
  background-color: var(--color-bg-3, #fbfbfc);
  border: 1px solid var(--color-stroke-2, rgba(0, 0, 0, 0.05));
  border-radius: var(--cornerRadiusXL, 16px);
  padding: var(--spacingL, 24px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.wallex-mcp-steps__slides {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wallex-mcp-steps__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

.wallex-mcp-steps__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  position: relative;
}

.wallex-mcp-steps__slide img {
  max-width: 80%;
  max-height: 240px;
  height: auto;
  object-fit: contain;
}

.wallex-mcp-steps__preview-fallback {
  width: 140px;
  height: 140px;
  color: var(--color-text-2, rgba(0, 0, 0, 0.6));
}

.wallex-mcp-steps__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--spacingM, 16px);
  z-index: 2;
}

.wallex-mcp-steps__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--cornerRadiusCircular, 1000px);
  background-color: var(--color-bg-4, #d7dadf);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wallex-mcp-steps__dot.is-active {
  width: 20px;
}

.wallex-mcp-steps__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacingL, 24px);
}

.wallex-mcp-steps__item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  cursor: pointer;
  border-radius: var(--cornerRadiusL, 12px);
  transition: background-color 0.25s ease;
  position: relative;
}

.wallex-mcp-steps__item.is-active {
  padding: 0 20px 0 0;
}

.wallex-mcp-steps__item:hover {
  background-color: var(--color-negativeGlassBg, rgba(0, 0, 0, 0.02));
}

.wallex-mcp-steps__item-number-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 48px;
  justify-content: flex-end;
}

.wallex-mcp-steps__item-indicator {
  width: 3px;
  height: 12px;
  border-radius: 16px;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.wallex-mcp-steps__item.is-active .wallex-mcp-steps__item-indicator {
  background-color: var(--color-primaryBrandBg, #007aff);
  height: 12px;
}

.wallex-mcp-steps__item-number {
  text-align: right;
  font-size: 56px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  background: linear-gradient(180deg, var(--color-text-1, rgba(37, 37, 37, 0.10)) 0%, var(--color-text-4, rgba(0, 0, 0, 0.02)) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.3;
}

.wallex-mcp-steps__item.is-active .wallex-mcp-steps__item-number {
  background: linear-gradient(180deg, var(--color-text-1, rgba(37, 37, 37, 0.30)) 0%, var(--color-text-4, rgba(0, 0, 0, 0.06)) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.7;
}

.wallex-mcp-steps__item-content {
  flex: 1;
  text-align: right;
}

.wallex-mcp-steps__item-title {
  margin: 0 0 6px 0;
  font-size: var(--body-large-size, 16px);
  line-height: var(--body-large-line-height, 28px);
  font-weight: 500;
  color: var(--color-text-1, #252525);
}

.wallex-mcp-steps__item-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.wallex-mcp-steps__avatars {
  display: flex;
  align-items: center;
  direction: ltr;
}

.wallex-mcp-steps__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: -6px;
  box-shadow: 0 0 0 2px var(--color-bg, #ffffff);
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.wallex-mcp-steps__avatar:last-child {
  margin-right: 0;
}

.wallex-mcp-steps__avatar:hover {
  z-index: 10 !important;
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--color-bg, #ffffff), 0 4px 12px rgba(0, 0, 0, 0.18);
}

.wallex-mcp-steps__avatar svg,
.wallex-mcp-steps__avatar img {
  width: 100%;
  height: 100%;
  display: block;
}

.wallex-mcp-steps__badges-text {
  font-size: 14px;
  color: var(--color-text-2);
  font-weight: 500;
}

.wallex-mcp-steps__item-desc {
  margin: 4px 0 0 0;
  font-size: var(--body-size, 14px);
  line-height: var(--body-line-height, 24px);
  color: var(--color-text-2, rgba(0, 0, 0, 0.6));
  direction: rtl;
  word-break: break-word;
}

.wallex-mcp-steps__item-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: var(--caption-size, 12px);
  font-weight: 500;
  color: var(--color-primaryBrandText, #007aff);
  text-decoration: none;
  transition: gap 0.2s ease;
}

.wallex-mcp-steps__item-link:hover {
  gap: 7px;
  color: var(--color-primaryBrandText-2, #0060c7);
}

.wallex-mcp-steps__link-icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 900px) {
  .wallex-mcp-steps__container {
    grid-template-columns: 1fr;
    gap: var(--spacingL, 24px);
  }

  .wallex-mcp-steps__preview {
    display: none;
  }

  .wallex-mcp-steps__list {
    order: 1;
  }

  .wallex-mcp-steps__item.is-active {
    padding: 0;
  }

  .wallex-mcp-steps__item.is-active .wallex-mcp-steps__item-indicator {
    display: none;
  }

  .wallex-mcp-steps__item:hover {
    background-color: unset;
  }

  .wallex-mcp-steps__item-number {
    opacity: 0.7;
  }

}