/* ============================================================
   SX Pricing Plans
   Flexible 3-6 tier pricing cards. Toggle 'show_prices' to hide
   prices strategically. Recommended card highlighted with border
   in its accent color + badge on top.
   ============================================================ */

.sx-pricing {
  padding: 90px 0 100px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

@media (max-width: 767px) {
  .sx-pricing { padding: 60px 0 70px; }
}

.sx-pricing__header {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
}

/* ============================================================
   Monthly / Annual billing toggle (pill design)
   ============================================================ */

.sx-pricing__billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eef3f9;
  padding: 4px;
  border-radius: 999px;
  margin: 0 auto 36px;
  border: 1px solid #dbe6f2;
}

/* Wrap the toggle to keep it centered */
.sx-pricing .sx-pricing__billing-toggle {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.sx-pricing__billing-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #4b5563;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.2px;
  font-family: inherit;
}

.sx-pricing__billing-btn:hover {
  color: #12314f;
}

.sx-pricing__billing-btn.is-active {
  background: #ffffff;
  color: #12314f;
  box-shadow: 0 2px 8px rgba(15, 30, 60, 0.12);
}

.sx-pricing__billing-hint {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #12314f;
  background: #FFD760;
  border-radius: 999px;
  line-height: 1.2;
}

@media (max-width: 480px) {
  .sx-pricing__billing-btn { padding: 8px 14px; font-size: 13px; }
  .sx-pricing__billing-hint { font-size: 9px; padding: 2px 6px; }
}

/* Grid — flexbox for centered incomplete last rows.
   Card width 200px + gap 16px allows 5-in-a-row on wide desktops
   (5 × 200 + 4 × 16 = 1064px, fits in ~1170px auto-container). */
.sx-pricing__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
}

.sx-pricing__card {
  --sx-plan-accent: #376CB4;
  flex: 0 0 200px;
  max-width: 200px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px 20px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-width: 0;
}

.sx-pricing__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 30, 60, 0.10);
  border-color: color-mix(in srgb, var(--sx-plan-accent) 30%, transparent);
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-pricing__card:hover { border-color: #cfd7e0; }
}

/* Top accent bar */
.sx-pricing__card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--sx-plan-accent);
  border-radius: 16px 16px 0 0;
}

/* Accent variants */
.sx-pricing__card--gray   { --sx-plan-accent: #9ca3af; }
.sx-pricing__card--green  { --sx-plan-accent: #62BEAC; }
.sx-pricing__card--blue   { --sx-plan-accent: #376CB4; }
.sx-pricing__card--red    { --sx-plan-accent: #E9465C; }
.sx-pricing__card--yellow { --sx-plan-accent: #b48a08; }

/* Recommended card highlighted with thicker border in its accent color */
.sx-pricing__card--recommended {
  border: 2px solid var(--sx-plan-accent);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--sx-plan-accent) 20%, rgba(15, 30, 60, 0.10));
  transform: translateY(-4px);
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-pricing__card--recommended {
    box-shadow: 0 12px 30px rgba(233, 70, 92, 0.16);
  }
}

.sx-pricing__card--recommended:hover {
  transform: translateY(-8px);
}

/* Recommended badge (top-centered above the card) */
.sx-pricing__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #ffffff;
  background: var(--sx-plan-accent);
  border-radius: 999px;
  text-transform: uppercase;
  line-height: 1.2;
  z-index: 2;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--sx-plan-accent) 40%, transparent);
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-pricing__badge { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
}

/* Icon */
.sx-pricing__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--sx-plan-accent) 14%, transparent);
  color: var(--sx-plan-accent);
  margin-bottom: 16px;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-pricing__icon { background: #f0f4f9; }
}

.sx-pricing__icon svg { width: 22px; height: 22px; }

/* Plan name */
.sx-pricing__plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--sx-plan-accent);
  margin: 0 0 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

/* Price */
.sx-pricing__price-wrap {
  margin-bottom: 20px;
  min-height: 62px;
}

/* Monthly/Annual visibility — controlled by grid data-billing attribute.
   Cards WITHOUT annual price (no --has-annual class) always show monthly regardless of toggle mode. */
.sx-pricing__price--annual { display: none; }
.sx-pricing__price-note--annual { display: none; }

/* When billing=annual AND this card has an annual price defined, swap them */
[data-billing="annual"] .sx-pricing__price-wrap--has-annual .sx-pricing__price--monthly { display: none; }
[data-billing="annual"] .sx-pricing__price-wrap--has-annual .sx-pricing__price--annual { display: flex; }
[data-billing="annual"] .sx-pricing__price-wrap--has-annual .sx-pricing__price-note--monthly { display: none; }
[data-billing="annual"] .sx-pricing__price-wrap--has-annual .sx-pricing__price-note--annual { display: block; }

.sx-pricing__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.sx-pricing__price-value {
  font-size: 30px;
  font-weight: 800;
  color: #12314f;
  line-height: 1.1;
  letter-spacing: -0.5px;
  overflow-wrap: break-word;
}

.sx-pricing__price--hidden .sx-pricing__price-value {
  font-size: 18px;
  font-weight: 700;
  color: #4b5563;
}

.sx-pricing__price-period {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.sx-pricing__price-note {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.4;
  margin-top: 6px;
  overflow-wrap: break-word;
}

/* Features */
.sx-pricing__features {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.sx-pricing__features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: #374151;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.sx-pricing__check {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: var(--sx-plan-accent);
}

.sx-pricing__features li span {
  flex: 1;
  min-width: 0;
}

/* CTA (block button at bottom of card — full width for consistent alignment) */
.sx-pricing__cta {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 12px;
  background: transparent;
  color: var(--sx-plan-accent) !important;
  border: 1.5px solid var(--sx-plan-accent);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  letter-spacing: 0.2px;
  margin-top: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Non-recommended hover: subtle tint + keep outline
   (so hover doesn't look identical to the recommended solid style — preserves visual hierarchy) */
.sx-pricing__cta:hover {
  background: color-mix(in srgb, var(--sx-plan-accent) 8%, transparent);
  color: var(--sx-plan-accent) !important;
  border-color: var(--sx-plan-accent);
  text-decoration: none;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-pricing__cta:hover { background: rgba(55, 108, 180, 0.08); }
}

.sx-pricing__cta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Recommended card: solid CTA (visual anchor — only this card is solid) */
.sx-pricing__card--recommended .sx-pricing__cta {
  background: var(--sx-plan-accent);
  color: #ffffff !important;
  border-color: var(--sx-plan-accent);
}

/* Recommended hover: keep solid but slightly darken */
.sx-pricing__card--recommended .sx-pricing__cta:hover {
  background: color-mix(in srgb, var(--sx-plan-accent) 85%, #000000);
  color: #ffffff !important;
  border-color: color-mix(in srgb, var(--sx-plan-accent) 85%, #000000);
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-pricing__card--recommended .sx-pricing__cta:hover { opacity: 0.9; }
}

/* Mobile responsive */
@media (max-width: 991px) {
  .sx-pricing__card {
    flex: 0 0 240px;
    max-width: 240px;
  }
  .sx-pricing__grid { gap: 18px; }
}

@media (max-width: 700px) {
  .sx-pricing__card {
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
  }
  .sx-pricing__grid { gap: 14px; }
}

@media (max-width: 480px) {
  .sx-pricing__card {
    flex: 1 1 100%;
    max-width: 360px;
  }
}
