/* ============================================================
   PricingHero — Component Styles
   Card styles live in PricingCard/PricingCard.css.
   Design tokens are defined in src/tokens.css.
   ============================================================ */

/* ---- Outer section ---- */
.pricing-hero {
  align-items:      center;
  background-color: var(--background);
  box-sizing:       border-box;
  display:          flex;
  flex-direction:   column;
  font-family:      var(--font-family-default);
  gap:              4rem;        /* 64px */
  padding:          8rem 0 6rem; /* 128px top, 96px bottom */
  width:            100%;
}


/* ============================================================
   Heading block
   ============================================================ */

.pricing-hero__heading {
  align-items:    center;
  display:        flex;
  flex-direction: column;
  gap:            1.5rem;      /* 24px */
  width:          100%; 
  margin-bottom:  4rem;        /* 64px */
}

/* ---- Tab switcher — uses shared Tabs component ---- */
.pricing-hero__tabs {
  display:         flex;
  justify-content: center;
  width:           100%;
}

/* ---- Heading title + subtitle ---- */
.pricing-hero__title {
  color:       var(--foreground);
  font-size:   3.75rem;        /* 60px */
  font-weight: var(--font-weight-bold);
  line-height: 1;
  margin:      0;
  max-width:   40rem;          /* 640px */
  text-align:  center;
}

.pricing-hero__subtitle {
  color:       var(--muted-foreground);
  font-size:   1.125rem;       /* 18px */
  font-weight: var(--font-weight-regular);
  line-height: 1.75rem;        /* 28px */
  margin:      0;
  max-width:   40rem;          /* 640px */
  text-align:  center;
}


/* ============================================================
   Pricing section (cards + details)
   ============================================================ */

.pricing-hero__section {
  align-items:    center;
  container-type: inline-size; /* enables @container queries on children */
  display:        flex;
  flex-direction: column;
  gap:            4rem;        /* 64px */
  width:          100%;
}


/* ============================================================
   Cards grid — auto-fit base + targeted orphan prevention
   auto-fit handles 1/2/4-col naturally; we only override in
   the specific ranges where it would create an orphan row.

   Card min-width = 15rem (240px), gap = 1rem (16px).
   N cols min width = N×240 + (N-1)×16.
     4 cols → 1008px   3 cols → 752px   2 cols → 496px
   ============================================================ */

.pricing-hero__packages {
  display: grid;
  gap:     1rem;               /* 16px */
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  width:   100%;
}

/* ---- 4 items: 3-col zone (752–1007px) → force 2 cols to avoid 3+1 orphan ---- */
@container (min-width: 752px) and (max-width: 1007px) {
  .pricing-hero__packages:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- 3 items: 2-col zone (496–751px) → force 1 col to avoid 2+1 orphan ---- */
@container (min-width: 496px) and (max-width: 751px) {
  .pricing-hero__packages:has(> :nth-child(3):last-child) {
    grid-template-columns: 1fr;
  }
}

/* ---- Cross-card section alignment via CSS subgrid ---- */
/* Each card's 4 sections (title-group, pricing, button-area, footer)
   participate in the parent row tracks so they align at the same
   Y position across all cards, regardless of content height differences. */
.pricing-hero__packages > .pricing-card {
  display:            grid;
  grid-row:           span 4;
  grid-template-rows: subgrid;
}


/* ============================================================
   Details section
   ============================================================ */

.pricing-hero__details {
  align-items:     center;
  display:         flex;
  flex-direction:  column;
  gap:             0.75rem;     /* 12px */
  justify-content: center;
  width:           100%;
  text-align: center;
}

.pricing-hero__guarantee {
  color:       var(--muted-foreground);
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  margin:      0;
  text-align:  center;
}

.pricing-hero__advantages {
  align-items:    center;
  display:        flex;
  flex-direction: column;
  gap:            1rem;        /* 16px */
}

.pricing-hero__advantage-row {
  align-items:     center;
  display:         flex;
  flex-wrap:       wrap;
  column-gap:             1.5rem;     /* 24px */
  row-gap: 1rem; /* 16px — separate row for each advantage on narrow screens */
  justify-content: center;
}

.pricing-hero__advantage {
  align-items: center;
  display:     flex;
  flex-shrink: 0;
  gap:         0.375rem;       /* 6px */
}

/* ---- Advantage icon badge ---- */
.pricing-hero__advantage-badge {
  align-items:     center;
  border-radius:   var(--radius-full);
  display:         inline-flex;
  flex-shrink:     0;
  height:          1.25rem;   /* 20px */
  justify-content: center;
  width:           1.25rem;
}

.pricing-hero__advantage-badge svg {
  display: block;
  height:  0.75rem;  /* 12px */
  width:   0.75rem;
}

.pricing-hero__advantage-badge--info {
  background-color: var(--info);
  color:            #ffffff;
}

.pricing-hero__advantage-badge--primary {
  background-color: var(--primary);
  color:            #ffffff;
}

.pricing-hero__advantage-text {
  color:       var(--foreground);
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  white-space: nowrap;
}


/* ============================================================
   Mobile — Webflow landscape breakpoint (≤767px)
   ============================================================ */

@media (max-width: 767px) {
  .pricing-hero {
    padding: 4rem 0;
  }


  .pricing-hero__title {
    font-size: 3rem;    /* 48px */
  }

  .pricing-hero__section {
    gap: 2.25rem;       /* 36px — between cards and details */
  }

  .pricing-hero__details {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .pricing-hero__advantages {
    width: 100%;
  }

  .pricing-hero__advantage-row {
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    flex-wrap: wrap;
    flex-direction: column;
  }
}

/* ============================================================
   Container — shared responsive layout constraint
   Provides 1024px max content width with responsive side padding.
   Import this in any component that uses the .container class.
   ============================================================ */

.container {
  position:  relative;
  width:     1024px;
  max-width: calc(100% - 160px); /* 80px × 2 — desktop */
  margin:    0 auto;
}

/* Tablet + landscape mobile (≤991px): 60px × 2 = 120px */
@media (max-width: 991px) {
  .container {
    max-width: calc(100% - 120px);
  }
}

/* Portrait mobile (≤479px): 16px × 2 = 32px */
@media (max-width: 479px) {
  .container {
    max-width: calc(100% - 32px);
  }
}


/* ============================================================
   Wide container — 1360px content + 48px side padding
   Used for full-bleed section content blocks (slider, big cards)
   that need to be wider than the standard 1024px text container.
   ============================================================ */

.container-wide {
  width:      100%;
  max-width:  calc(1360px + 128px);  /* 1360px content + 64px × 2 */
  padding:    0 4rem;                /* 64px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet + landscape mobile (≤991px) */
@media (max-width: 991px) {
  .container-wide {
    padding: 0 2rem;
  }
}

/* Portrait mobile (≤479px) */
@media (max-width: 479px) {
  .container-wide {
    padding: 0 1rem;
  }
}

/* ============================================================
   Tabs — Segmented pill tab bar
   Design tokens from src/tokens.css.
   ============================================================ */

.seg-tabs {
  display:       inline-flex;
  align-items:   center;
  flex-shrink:   0;
  height:        38px;
  background:    var(--muted);
  border-radius: var(--radius-full);
  column-gap:    1px;
}

/* Individual tab — button or anchor */
.seg-tabs__tab {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             var(--spacing-1-5);
  height:          100%;
  padding:         var(--spacing-2) var(--spacing-4); /* 8px 16px */
  border:          1px solid transparent; /* size-stable when active border appears */
  border-radius:   var(--radius-full);
  background:      transparent;
  color:           var(--foreground);
  font-family:     var(--font-family-default);
  font-size:       var(--font-size-sm);   /* 14px */
  font-weight:     var(--font-weight-medium);
  line-height:     var(--line-height-sm);
  cursor:          pointer;
  text-decoration: none;  /* reset <a> default */
  white-space:     nowrap;
  transition:      background 0.2s, border-color 0.2s;
  box-sizing: border-box;
}

.seg-tabs__tab:hover {
  background: var(--opacity-background-50);
}

/* Active tab — only visible in playing state (.seg-tabs--active) */
.seg-tabs--active .seg-tabs__tab.is-active {
  background: var(--background);
  border:     1px solid var(--border);
}

.seg-tabs--active .seg-tabs__tab.is-active:hover {
  background: var(--background);
}

/* Icon slot */
.seg-tabs__tab-icon {
  display:     flex;
  align-items: center;
  flex-shrink: 0;
}

.seg-tabs__tab-icon svg {
  display: block;
  width:   1rem;
  height:  1rem;
}


/* ============================================================
   Light-alt scheme — warm secondary track, card active pill
   Matches the "light 2" DemoPlayer variant.
   ============================================================ */

.seg-tabs--light-alt {
  background: var(--secondary);
}

.seg-tabs--light-alt .seg-tabs__tab:hover {
  background: var(--popover);
}

.seg-tabs--light-alt.seg-tabs--active .seg-tabs__tab.is-active,
.seg-tabs--light-alt.seg-tabs--active .seg-tabs__tab.is-active:hover {
  background: var(--card);
}

/* ============================================================
   PricingCard — Component Styles
   All colors are resolved via CSS custom properties so the
   component responds correctly to data-scheme="light|dark"
   set on the card root element.
   ============================================================ */

.pricing-card {
  background-color: var(--card);
  border-radius:    var(--radius-lg);
  box-sizing:       border-box;
  display:          flex;
  flex-direction:   column;
  font-family:      var(--font-family-default);
  gap:              1rem;       /* 16px */
  overflow:         hidden;
  padding:          1.5rem 1.5rem 2rem; /* 24px 24px 32px */
}


/* ============================================================
   Title group
   ============================================================ */

.pricing-card__title-group {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            0.625rem;    /* 10px */
}


.pricing-card__description,
.pricing-card__price {
  color:       var(--muted-foreground);
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  margin:      0;
}

[data-scheme="dark"] .pricing-card__description,
[data-scheme="dark"] .pricing-card__price {
  color: var(--muted-foreground-card);
}


/* ============================================================
   Pricing block
   ============================================================ */

.pricing-card__pricing {
  display:        flex;
  flex-direction: column;
  gap:            0.25rem;     /* 4px */
}

.pricing-card__call-volume {
  color:       var(--foreground);
  font-size:   2.25rem;        /* 36px */
  font-weight: var(--font-weight-bold);
  line-height: 2.5rem;         /* 40px */
  margin:      0;
}

.pricing-card__price {
  white-space: nowrap;
}


/* ============================================================
   CTA — delegates to Button component
   ============================================================ */

.pricing-card__button-area {
  padding: 1rem 0;             /* 16px top/bottom */
}

/* Make the Button fill the full card width */
.pricing-card__cta {
  width: 100%;
}


/* ============================================================
   Footer — transfer / overage info
   ============================================================ */

.pricing-card__footer {
  display:        flex;
  flex-direction: column;
}

.pricing-card__transfer {
  align-items: flex-start;
  display:     flex;
  gap:         0.375rem;       /* 6px */
}

/* Count / icon pill — inverts between schemes automatically:
   light scheme: dark bg (#282825) + light content (#F5F0E7)
   dark  scheme: light bg (#F5F0E7) + dark content (#1A1A18)
   Accepts text (numbers) or an SVG icon. */
.pricing-card__transfer-count {
  align-items:      center;
  background-color: var(--foreground);
  border-radius:    var(--radius-full);
  color:            var(--background);
  display:          inline-flex;
  flex-shrink:      0;
  font-size:        0.75rem;
  font-weight:      var(--font-weight-medium);
  height:           1.25rem;   /* 20px */
  justify-content:  center;
  line-height:      1;
  padding:          0 0.25rem;  /* 4px sides — flexible width for any content */
  min-width:        1.25rem;   /* 20px — ensures circular shape for single-digit numbers */
  box-sizing:       border-box;
}

.pricing-card__transfer-count svg {
  display: block;
  height:  0.75rem;  /* 12px */
  width:   0.75rem;
}

.pricing-card__transfer-text {
  color:       var(--foreground);
  font-size:   var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-sm);
}

/* ============================================================
   Button — Component Styles
   Scheme-aware: inherits data-scheme from a parent element.
   All color tokens flip automatically in dark context.
   ============================================================ */

.btn {
  /* Layout */
  align-items:     center;
  border:          1px solid transparent;
  box-sizing:      border-box;
  cursor:          pointer;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
  overflow:        hidden;
  text-decoration: none;
  user-select:     none;
  white-space:     nowrap;

  /* Typography */
  font-family: var(--font-family-default);
  font-weight: var(--font-weight-medium);

  /* Transition */
  transition: opacity 120ms ease;
}


/* ============================================================
   Sizes
   Heights: xs=26px  sm=32px  md=36px  lg=40px
   All use font-size-sm (14px) except xs which uses font-size-xs (12px).
   ============================================================ */

.btn[data-size="xs"] {
  font-size:   var(--font-size-xs);      /* 12px */
  line-height: var(--line-height-xs);    /* 16px */
  gap:         0.25rem;                  /* 4px  */
  padding:     0.3125rem 0.75rem;        /* 5px 12px → height 26px */
}

.btn[data-size="sm"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.375rem;                 /* 6px  */
  padding:     0.375rem 1rem;            /* 6px 16px → height 32px */
}

.btn[data-size="md"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.375rem;                 /* 6px  */
  padding:     0.5rem 1.25rem;           /* 8px 20px → height 36px */
}

.btn[data-size="lg"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.5rem;                   /* 8px  */
  padding:     0.625rem 1.5rem;          /* 10px 24px → height 40px */
}


/* ============================================================
   Shapes
   ============================================================ */

.btn[data-shape="rounded"] { border-radius: var(--radius-sm);   } /* 8px  */
.btn[data-shape="round"]   { border-radius: var(--radius-full); } /* pill */


/* ============================================================
   Variants
   ============================================================ */

.btn[data-variant="primary"] {
  background-color: var(--primary);
  border-color:     var(--primary);
  color:            var(--primary-foreground);
}

.btn[data-variant="secondary"] {
  background-color: var(--secondary);
  border-color:     var(--border);
  color:            var(--secondary-foreground);
}

.btn[data-variant="info"] {
  background-color: var(--info);
  border-color:     var(--info);
  color:            var(--info-foreground);
}

.btn[data-variant="success"] {
  background-color: var(--success);
  border-color:     var(--success);
  color:            var(--success-foreground);
}

.btn[data-variant="warning"] {
  background-color: var(--warning);
  border-color:     var(--warning);
  color:            var(--warning-foreground);
}

.btn[data-variant="destructive"] {
  background-color: var(--destructive);
  border-color:     var(--destructive);
  color:            var(--destructive-foreground);
}


/* ============================================================
   States
   ============================================================ */

/* Hover */
.btn:hover:not(:disabled):not([aria-disabled="true"]) {
  opacity: 0.88;
}

/* Active / pressed */
.btn:active:not(:disabled):not([aria-disabled="true"]) {
  opacity: 0.76;
}

/* Focus */
.btn:focus-visible {
  outline:        2px solid var(--ring);
  outline-offset: 2px;
}

/* Disabled */
.btn:disabled,
.btn[aria-disabled="true"] {
  cursor:         not-allowed;
  opacity:        0.4;
  pointer-events: none;
}


/* ============================================================
   Icon slot
   ============================================================ */

.btn__icon {
  align-items:     center;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
}

.btn[data-size="xs"] .btn__icon { height: 0.75rem; width: 0.75rem; } /* 12px */
.btn[data-size="sm"] .btn__icon,
.btn[data-size="md"] .btn__icon,
.btn[data-size="lg"] .btn__icon { height: 1rem;    width: 1rem;    } /* 16px */

.btn__icon svg {
  display: block;
  height:  100%;
  width:   100%;
}


/* ============================================================
   Badge slot — optional count pill inside the button
   ============================================================ */

.btn__badge {
  align-items:      center;
  background-color: var(--primary);
  border-radius:    var(--radius-full);
  color:            var(--primary-foreground);
  display:          inline-flex;
  font-size:        var(--font-size-xs);   /* 12px */
  font-weight:      var(--font-weight-medium);
  justify-content:  center;
  line-height:      var(--line-height-xs); /* 16px */
  min-width:        1.25rem;               /* 20px */
  padding:          0.125rem 0.375rem;     /* 2px 6px */
}

/* ============================================================
   Badge — pill label with color variants, sizes, and states
   Design tokens from src/tokens.css.
   ============================================================ */

/* ---- Base ---- */

.badge {
  align-items:     center;
  border-radius:   var(--radius-full);
  display:         inline-flex;
  flex-shrink:     0;
  font-family:     var(--font-family-default);
  font-size:       var(--font-size-xs);
  font-weight:     var(--font-weight-medium);
  gap:             var(--spacing-1-5);
  line-height:     1;
  text-decoration: none;    /* reset <a> */
  transition:      opacity 0.15s;
  white-space:     nowrap;
}

/* Interactive reset for button root */
button.badge {
  appearance: none;
  border:     none;
  cursor:     pointer;
}

/* Inactive toggle state */
.badge--inactive {
  opacity: 0.45;
}

/* Hover — only on interactive roots (button / link) */
a.badge:hover,
button.badge:hover {
  opacity: 0.8;
}

/* Focus */
a.badge:focus-visible,
button.badge:focus-visible {
  outline:        1.5px solid var(--info);
  outline-offset: 2px;
}


/* ============================================================
   Shapes
   ============================================================ */

.badge--round   { border-radius: var(--radius-full); }
.badge--rounded { border-radius: var(--radius-sm);   }


/* ============================================================
   Sizes
   ============================================================ */

.badge--sm {
  gap:     var(--spacing-1);
  height: 1.5rem;                            /* 24px     */
  padding: 0 var(--spacing-2);  /* 4px 8px  */
}

.badge--md {
  gap:     var(--spacing-1-5);
  height:  1.75rem;                           /* 28px     */
  padding: 0 var(--spacing-3);                  /* 0 12px   */
}

.badge--lg {
  gap:     var(--spacing-2);
  height:  2rem;                                /* 32px     */
  padding: 0 0.9375rem;                         /* 0 15px   */
}


/* ============================================================
   Variants
   ============================================================ */

.badge--primary {
  background-color: var(--opacity-primary-10);
  color:            var(--primary);
}

.badge--secondary {
  background-color: var(--opacity-background-60);
  color:            var(--foreground);
}

.badge--info {
  background-color: var(--opacity-info-10);
  color:            var(--info);
}

.badge--success {
  background-color: var(--opacity-success-10);
  color:            var(--success);
}

.badge--warning {
  background-color: var(--opacity-warning-10);
  color:            var(--warning);
}

.badge--destructive {
  background-color: var(--opacity-destructive-10);
  color:            var(--destructive);
}


/* ============================================================
   Inner elements
   ============================================================ */

/* Label — plain text wrapper */
.badge__label {
  display: contents;
}

/* Left icon */
.badge__icon {
  align-items:     center;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
}

.badge__icon svg {
  display: block;
  height:  0.875rem;   /* 14px */
  width:   0.875rem;
}

/* Left avatar */
.badge__avatar {
  border-radius: var(--radius-full);
  display:       block;
  flex-shrink:   0;
  height:        0.875rem;   /* 14px */
  object-fit:    cover;
  width:         0.875rem;
}

/* Close button */
.badge__close {
  align-items:     center;
  appearance:      none;
  background:      transparent;
  border:          none;
  color:           inherit;
  cursor:          pointer;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
  line-height:     1;
  opacity:         0.6;
  padding:         0;
  transition:      opacity 0.15s;
}

.badge__close:hover {
  opacity: 1;
}

.badge__close svg {
  display: block;
  height:  0.625rem;   /* 10px */
  width:   0.625rem;
}

