/**
 * Styles for Wallex MCP Features widget with responsive mobile peek slider.
 * @since 2.6.7
 */

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

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

.wallex-mcp-features__segment-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--spacingXL, 32px);
}

.wallex-mcp-features__segment {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-negativeGlassBg, rgba(0, 0, 0, 0.02));
  border: 1px solid var(--color-stroke-2, rgba(0, 0, 0, 0.05));
  border-radius: var(--cornerRadiusCircular, 1000px);
  padding: var(--spacingXXS, 4px);
  gap: var(--spacingXXS, 4px);
}

.wallex-mcp-features__tab {
  border: none;
  background: transparent;
  padding: 8px 20px;
  border-radius: var(--cornerRadiusCircular, 1000px);
  font-family: inherit;
  font-size: var(--body-size, 14px);
  font-weight: 500;
  color: var(--color-text-2, rgba(0, 0, 0, 0.6));
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
  white-space: nowrap;
}

.wallex-mcp-features__tab:hover {
  color: var(--color-text-1, #252525);
}

.wallex-mcp-features__tab.is-active {
  background-color: var(--color-primaryBrandBg, #007aff);
  color: var(--color-onColorLightText, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.wallex-mcp-features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacingM, 16px);
}

.wallex-mcp-features__grid[data-col-desktop="1"] {
  grid-template-columns: 1fr;
}

.wallex-mcp-features__grid[data-col-desktop="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.wallex-mcp-features__grid[data-col-desktop="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.wallex-mcp-features__grid[data-col-desktop="4"] {
  grid-template-columns: repeat(4, 1fr);
}

.wallex-mcp-features__card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  background-color: var(--color-bg-2, #fbfbfc);
  border: 1px solid var(--color-stroke-2, rgba(0, 0, 0, 0.05));
  border-radius: var(--cornerRadiusXL, 16px);
  padding: var(--spacingMNudge, 20px) var(--spacingM, 16px) 0 var(--spacingM, 16px);
  min-height: 248px;
  max-width: 252px;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.wallex-mcp-features__card:hover {
  border-color: var(--color-stroke-3, rgba(0, 0, 0, 0.1));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.wallex-mcp-features__card.is-hidden {
  display: none !important;
}

.wallex-mcp-features__card-content {
  text-align: right;
  z-index: 2;
}

.wallex-mcp-features__title {
  margin: 0 0 var(--spacingXXS, 4px) 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-features__desc {
  margin: 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));
}

.wallex-mcp-features__illustration {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  position: relative;
  height: 172px;
  width: 172px;
  margin-bottom: -40px;
}

.wallex-mcp-features__illustration img {
  height: auto;
}

.wallex-mcp-features__default-icon {
  width: 120px;
  height: 90px;
  color: var(--color-primaryBrandBg, #007aff);
}

@media (max-width: 1024px) {
  .wallex-mcp-features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wallex-mcp-features__grid[data-col-tablet="1"] {
    grid-template-columns: 1fr;
  }

  .wallex-mcp-features__grid[data-col-tablet="2"] {
    grid-template-columns: repeat(2, 1fr);
  }

  .wallex-mcp-features__grid[data-col-tablet="3"] {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .wallex-mcp-features {
    overflow: hidden;
    position: relative;
    width: 100%;
    touch-action: pan-y;
  }

  .wallex-mcp-features.is-dragging {
    user-select: none;
    -webkit-user-select: none;
  }

  .wallex-mcp-features__segment-wrap {
    margin-bottom: var(--spacingMNudge, 20px);
  }

  .wallex-mcp-features__grid {
    display: flex !important;
    width: max-content !important;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--spacingM, 16px);
    padding: var(--spacingXS, 8px) 0;
    margin: 0;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
  }

  .wallex-mcp-features.is-dragging .wallex-mcp-features__grid,
  .wallex-mcp-features.is-snapping .wallex-mcp-features__grid {
    transition: none !important;
  }

  .wallex-mcp-features__grid::-webkit-scrollbar {
    display: none;
  }

  .wallex-mcp-features__card {
    flex: 0 0 246px;
    width: 246px;
    min-width: 246px;
    max-width: 246px;
    height: 240px;
    min-height: 240px;
    max-height: 240px;
    padding: var(--spacingMNudge, 20px) var(--spacingM, 16px) 0 var(--spacingM, 16px);
    transform: scale(0.93);
    opacity: 0.78;
    transition: transform 0.35s ease, opacity 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    touch-action: pan-y;
    -webkit-user-drag: none;
  }

  .wallex-mcp-features__card.is-active,
  .wallex-mcp-features__card.is-focused {
    transform: scale(1);
    opacity: 1;
    border-color: var(--color-stroke-3, rgba(0, 0, 0, 0.1));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .wallex-mcp-features__card img,
  .wallex-mcp-features__card svg {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
  }

  .wallex-mcp-features__title {
    font-size: var(--body-large-size, 16px);
    line-height: var(--body-large-line-height, 28px);
    margin-bottom: var(--spacingXXS, 4px);
  }

  .wallex-mcp-features__desc {
    font-size: var(--caption-size, 12px);
    line-height: var(--caption-line-height, 20px);
  }

  .wallex-mcp-features__illustration {
    min-height: 105px;
    margin-top: var(--spacingS, 12px);
  }
}