/*
 * Marketra — Bundle Tiers widget styles.
 * Scoped under .mk-bundle-tiers. Uses tokens from style.css.
 */

/* ---- Root ---------------------------------------------------------------- */
.mk-bundle-tiers {
  --mk-bt-accent: var(--mk-rose);
  --mk-bt-featured: var(--mk-rose);
  --mk-bt-card-bg: var(--mk-navy-3);
  --mk-bt-card-radius: 24px;
  --mk-bt-card-pad: 32px;
  --mk-bt-comp-pad: 18px;
  --mk-bt-card-gap: 24px;
  --mk-bt-comp-gap: 12px;

  position: relative;
  display: block;
}

/* ---- Group --------------------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-group { margin-top: 56px; }
.mk-bundle-tiers .mk-bundle-group:first-child { margin-top: 0; }
.mk-bundle-tiers .mk-bundle-group-header { margin-bottom: 36px; }
.mk-bundle-tiers .mk-bundle-group-eyebrow {
  display: inline-block;
  font-family: var(--mk-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mk-bt-accent);
  margin-bottom: 12px;
}
.mk-bundle-tiers .mk-bundle-group-heading {
  font-family: var(--mk-display);
  color: var(--mk-ink);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 0.95;
  margin: 0 0 14px;
}
.mk-bundle-tiers .mk-bundle-group-intro {
  color: var(--mk-ink-2);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 680px;
}

/* ---- Grid ---------------------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-grid {
  display: grid;
  gap: var(--mk-bt-card-gap);
  align-items: stretch;
}

/* ---- Card ---------------------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: var(--mk-bt-card-pad);
  background: var(--mk-bt-card-bg);
  border: 1px solid var(--mk-line);
  border-radius: var(--mk-bt-card-radius);
  transition: border-color .15s ease, transform .15s ease;
}
.mk-bundle-tiers .mk-bundle-card:hover { border-color: var(--mk-line-strong); }
.mk-bundle-tiers .mk-bundle-card-featured {
  border-color: var(--mk-bt-featured);
  box-shadow: 0 0 0 1px var(--mk-bt-featured), 0 24px 64px -28px rgba(244,63,94,0.45);
}

.mk-bundle-tiers .mk-bundle-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mk-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--mk-bt-featured);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---- Card head ----------------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-card-head { display: flex; flex-direction: column; gap: 14px; }
.mk-bundle-tiers .mk-bundle-card-name {
  font-family: var(--mk-display);
  color: var(--mk-ink);
  font-size: 36px;
  line-height: 1.1;
  margin: 0;
}

/* ---- Price block --------------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-price-wrap { display: flex; flex-direction: column; gap: 10px; }
.mk-bundle-tiers .mk-bundle-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  color: var(--mk-ink);
}
.mk-bundle-tiers .mk-bundle-price-setup,
.mk-bundle-tiers .mk-bundle-price-monthly {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.mk-bundle-tiers .mk-bundle-price-prefix {
  font-family: var(--mk-mono);
  font-size: 18px;
  color: var(--mk-ink-2);
}
.mk-bundle-tiers .mk-bundle-price-value {
  font-family: var(--mk-display);
  font-size: clamp(48px, 5vw, 64px);
  line-height: 1;
  color: var(--mk-ink);
}
.mk-bundle-tiers .mk-bundle-price-label {
  font-family: var(--mk-mono);
  font-size: 13px;
  color: var(--mk-ink-3);
  margin-left: 4px;
}
.mk-bundle-tiers .mk-bundle-price-sep {
  font-family: var(--mk-mono);
  color: var(--mk-ink-3);
  font-size: 16px;
}

/* ---- Per-location adder -------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-adder {
  font-family: var(--mk-mono);
  font-size: 12px;
  color: var(--mk-ink-2);
}

/* ---- Savings badge ------------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-savings {
  font-family: var(--mk-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  align-self: flex-start;
}
.mk-bundle-tiers .mk-bundle-savings-pill {
  background: var(--mk-rose-soft);
  color: var(--mk-rose-2);
  padding: 6px 12px;
  border-radius: 999px;
}
.mk-bundle-tiers .mk-bundle-savings-text { color: var(--mk-rose-2); }
.mk-bundle-tiers .mk-bundle-savings-bordered {
  color: var(--mk-rose-2);
  border: 1px solid currentColor;
  padding: 5px 11px;
  border-radius: 8px;
}

/* ---- CTAs ---------------------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-cta { align-self: stretch; }
.mk-bundle-tiers .mk-bundle-cta-top    { margin-top: 4px; }
.mk-bundle-tiers .mk-bundle-cta-bottom { margin-top: 16px; }

/* ---- Components container ----------------------------------------------- */
.mk-bundle-tiers .mk-bundle-components {
  display: flex;
  flex-direction: column;
  gap: var(--mk-bt-comp-gap);
}

/* ---- Single component --------------------------------------------------- */
.mk-bundle-tiers .mk-bundle-component {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--mk-line);
  border-radius: 14px;
  overflow: hidden;
}
.mk-bundle-tiers .mk-bundle-component-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: var(--mk-bt-comp-pad);
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: default;
}
.mk-bundle-tiers .mk-bundle-component-head-toggle {
  cursor: pointer;
  transition: background .15s ease;
}
.mk-bundle-tiers .mk-bundle-component-head-toggle:hover { background: rgba(255,255,255,0.03); }

.mk-bundle-tiers .mk-bundle-component-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.mk-bundle-tiers .mk-bundle-component-eyebrow {
  font-family: var(--mk-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mk-bt-accent);
}
.mk-bundle-tiers .mk-bundle-component-title {
  font-weight: 600;
  color: var(--mk-ink);
  font-size: 15px;
  line-height: 1.3;
}
.mk-bundle-tiers .mk-bundle-component-subtitle {
  font-size: 13px;
  color: var(--mk-ink-3);
  line-height: 1.4;
}

/* Per-component control affordance */
.mk-bundle-tiers .mk-bundle-component-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mk-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mk-ink-3);
  flex-shrink: 0;
}
.mk-bundle-tiers .mk-bundle-component-chevron {
  display: inline-block;
  transition: transform .2s ease;
}
.mk-bundle-tiers .mk-bundle-component[data-expanded="1"] .mk-bundle-component-chevron {
  transform: rotate(180deg);
}
.mk-bundle-tiers .mk-bundle-component-icon-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--mk-line);
  font-size: 16px;
  line-height: 1;
  color: var(--mk-ink-2);
}
.mk-bundle-tiers .mk-bundle-component-control-button .mk-bundle-component-control-label {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--mk-line);
  color: var(--mk-ink-2);
}

/* Component body */
.mk-bundle-tiers .mk-bundle-component-body {
  padding: 0 var(--mk-bt-comp-pad) var(--mk-bt-comp-pad);
  max-height: 9999px;
  overflow: hidden;
  transition: max-height .35s ease, padding-bottom .25s ease, opacity .2s ease;
}
.mk-bundle-tiers .mk-bundle-component-body[data-collapsed="1"] {
  max-height: 0;
  padding-bottom: 0;
  opacity: 0;
}

/* Feature list */
.mk-bundle-tiers .mk-bundle-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mk-bundle-tiers .mk-bundle-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--mk-ink-2);
  font-size: 14px;
  line-height: 1.5;
}
.mk-bundle-tiers .mk-bundle-feature-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mk-bt-accent);
  margin-top: 2px;
}
.mk-bundle-tiers .mk-bundle-feature-check svg { width: 14px; height: 14px; }
.mk-bundle-tiers .mk-bundle-feature-text { flex: 1; }

/* Compare-all per-card button */
.mk-bundle-tiers .mk-bundle-expand-all {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  color: var(--mk-bt-accent);
  font-family: var(--mk-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 0;
}
.mk-bundle-tiers .mk-bundle-expand-all:hover { color: var(--mk-rose); }
.mk-bundle-tiers .mk-bundle-expand-all-button {
  align-self: stretch;
  justify-content: center;
  border: 1px solid var(--mk-line);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--mk-ink);
}
.mk-bundle-tiers .mk-bundle-expand-all-button:hover {
  border-color: var(--mk-bt-accent);
}
.mk-bundle-tiers .mk-bundle-expand-all-chevron {
  display: inline-block;
  transition: transform .2s ease;
}
.mk-bundle-tiers .mk-bundle-expand-all[aria-expanded="true"] .mk-bundle-expand-all-chevron {
  transform: rotate(180deg);
}

/* Footer note */
.mk-bundle-tiers .mk-bundle-footer-note {
  font-size: 13px;
  color: var(--mk-ink-3);
  margin: 4px 0 0;
}

/* Gated bullets — hidden until expanded */
.mk-bundle-tiers .mk-bundle-feature[data-gated="1"] { display: none; }
.mk-bundle-tiers .mk-bundle-component[data-expanded="1"] .mk-bundle-feature[data-gated="1"] { display: flex; }

/* No-JS fallback: expanded by default */
.mk-bundle-tiers.no-js .mk-bundle-component[data-expanded="0"] .mk-bundle-component-body[data-collapsed="1"] {
  max-height: 9999px;
  padding-bottom: var(--mk-bt-comp-pad);
  opacity: 1;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .mk-bundle-tiers .mk-bundle-grid {
    grid-template-columns: 1fr !important;
  }
  .mk-bundle-tiers .mk-bundle-card { padding: 24px; }
  .mk-bundle-tiers .mk-bundle-card-name { font-size: 32px; }
  .mk-bundle-tiers .mk-bundle-price-value { font-size: 44px; }
  .mk-bundle-tiers .mk-bundle-price-prefix { font-size: 16px; }
}

@media (max-width: 640px) {
  .mk-bundle-tiers .mk-bundle-card { padding: 20px; }
  .mk-bundle-tiers .mk-bundle-component-head { padding: 14px; }
  .mk-bundle-tiers .mk-bundle-component-body { padding: 0 14px 14px; }
  .mk-bundle-tiers .mk-bundle-ribbon {
    font-size: 9px;
    padding: 5px 12px;
  }
}
