/* === Tariffs comparison page (/tariffs.php) === */

.fp-tariffs {
  --tp-blue: #0027F3;
  --tp-blue-soft: #E8ECFF;
  --tp-text: #0F1633;
  --tp-text-soft: #5B6378;
  --tp-border: #E5E8EF;
  --tp-row-hover: #F7F8FB;
  --tp-yes: #16A34A;
  --tp-no: #C0C5CF;
  --tp-soon: #B45309;
  --tp-soon-bg: #FEF3C7;
  --tp-bg: #FFFFFF;
  --tp-bg-stripe: #FAFBFD;
}

/* fp-top gradient inherited from features.css (light bg, dark text) */
.fp-tariffs .fp-top {
  padding-bottom: 40px;
}

.tp-hero {
  padding: 40px 0 60px;
}

.tp-breadcrumbs {
  display: flex;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  color: var(--tp-text-soft);
}
.tp-breadcrumbs a {
  color: var(--tp-text-soft);
  text-decoration: none;
}
.tp-breadcrumbs a:hover { color: var(--tp-blue); text-decoration: underline; }
.tp-breadcrumbs .active { color: var(--tp-text); font-weight: 600; }

.tp-hero-title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--tp-text);
  letter-spacing: -0.5px;
}

.tp-hero-subtitle {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.55;
  color: var(--tp-text-soft);
  max-width: 720px;
  margin: 0;
}

/* === Table wrap === */

.fp-tariffs .tp-table-wrap {
  background: #fff;
  position: relative;
  padding: 40px 0 80px;
}

.fp-tariffs .tariffs__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Sticky tier header === */

.tp-tiers {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) 1fr 1fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: 16px;
  padding: 24px 24px 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(15, 22, 51, 0.06);
  transition: padding 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease;
}

/* Compact mode when stuck to top: only tier names visible */
.tp-tiers.is-stuck {
  padding: 10px 24px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(15, 22, 51, 0.1);
}
.tp-tiers.is-stuck .tp-toggle-title,
.tp-tiers.is-stuck .tp-billing-toggle,
.tp-tiers.is-stuck .tp-tier__desc,
.tp-tiers.is-stuck .tp-tier__price,
.tp-tiers.is-stuck .tp-tier__discount-row,
.tp-tiers.is-stuck .tp-tier__cta {
  display: none;
}
.tp-tiers.is-stuck .tp-tier {
  background: transparent !important;
  justify-content: center;
}
.tp-tiers.is-stuck .tp-tier__badge {
  position: static;
  transform: none;
  display: inline-block;
  margin: 0 0 2px;
  font-size: 9px;
  padding: 2px 8px;
  box-shadow: none;
}
.tp-tiers.is-stuck .tp-tier__name {
  font-size: 15px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tp-tiers.is-stuck .tp-tiers__cell--label {
  justify-content: center;
}

/* Sentinel placed before the sticky header, used by IntersectionObserver */
.tp-sticky-sentinel {
  height: 1px;
  margin-bottom: -1px;
  pointer-events: none;
}

.tp-tiers__cell {
  padding: 0 16px;
  border-right: 1px solid var(--tp-border);
}
.tp-tiers__cell:last-child { border-right: none; }

.tp-tiers__cell--label {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tp-toggle-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--tp-text);
  margin: 0 0 16px;
}

.tp-billing-toggle {
  display: inline-flex;
  background: var(--tp-blue-soft);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tp-billing-btn {
  background: transparent;
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--tp-text);
  transition: background 0.2s, color 0.2s;
}
.tp-billing-btn.is-active {
  background: var(--tp-blue);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 39, 243, 0.3);
}

.tp-diff-toggle {
  display: inline-flex;
  gap: 4px;
}

.tp-diff-btn {
  background: transparent;
  border: 1px solid var(--tp-border);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--tp-text-soft);
  transition: all 0.2s;
}
.tp-diff-btn.is-active {
  background: var(--tp-text);
  color: #fff;
  border-color: var(--tp-text);
}
.tp-diff-btn:hover:not(.is-active) {
  border-color: var(--tp-text-soft);
  color: var(--tp-text);
}

/* Tier card */
.tp-tier {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tp-tier__badge {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFC400;
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 196, 0, 0.4);
}

.tp-tier[data-tier="extended_plus"] {
  background: linear-gradient(180deg, rgba(0, 39, 243, 0.04) 0%, rgba(0, 39, 243, 0) 100%);
  border-radius: 12px;
}

.tp-tier__name {
  font-size: 22px;
  font-weight: 700;
  color: var(--tp-text);
  margin: 0 0 6px;
}

.tp-tier__desc {
  font-size: 13px;
  color: var(--tp-text-soft);
  margin: 0 0 18px;
  min-height: 36px;
}

.tp-tier__price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 8px;
}

.tp-tier__price-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--tp-blue);
  line-height: 1;
}

.tp-tier__per {
  font-size: 12px;
  color: var(--tp-text-soft);
}

.tp-tier__discount-row {
  min-height: 22px;
  margin-bottom: 14px;
}

.tp-tier__discount {
  display: inline-block;
  background: #ECFDF5;
  color: #047857;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.tp-tier__cta {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
}

/* === Feature table === */

.tp-table {
  margin-top: 8px;
}

.tp-cat {
  margin-top: 32px;
}

.tp-cat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--tp-blue);
  color: #fff;
  border-radius: 12px;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 18px;
}

.tp-cat__icon svg {
  display: block;
}

.tp-cat__name {
  flex: 1;
}

.tp-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) 1fr 1fr 1fr;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--tp-border);
  transition: background 0.15s;
}
.tp-row:hover {
  background: var(--tp-row-hover);
}
.tp-row:nth-child(even) {
  background: var(--tp-bg-stripe);
}
.tp-row:nth-child(even):hover {
  background: var(--tp-row-hover);
}

.tp-row__feat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 16px;
  font-size: 14px;
  color: var(--tp-text);
  line-height: 1.4;
}

.tp-row__feat-name {
  flex-shrink: 1;
  min-width: 0;
}

.tp-row__cell {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 8px;
}

/* === Cell value styling === */

.tcell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.tcell--yes {
  color: var(--tp-yes);
  background: #ECFDF5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.tcell--no {
  color: var(--tp-no);
  font-size: 22px;
  font-weight: 400;
}

.tcell--soon {
  background: var(--tp-soon-bg);
  color: var(--tp-soon);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
}

.tcell--text {
  color: var(--tp-text);
}

/* === Tooltip === */

.tp-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  flex-shrink: 0;
}

.tp-tip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tp-blue-soft);
  color: var(--tp-blue);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}

.tp-tip__bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--tp-text);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  text-align: left;
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.tp-tip__bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--tp-text);
}

.tp-tip:hover .tp-tip__bubble,
.tp-tip:focus .tp-tip__bubble,
.tp-tip:focus-within .tp-tip__bubble {
  opacity: 1;
  pointer-events: auto;
}

/* === Diff filter === */

.tp-table.is-diff-only .tp-row[data-diff="0"] {
  display: none;
}

.tp-table.is-diff-only .tp-cat {
  /* hide empty categories */
}

/* === FAQ === */

.tp-faq {
  background: #F7F8FB;
  padding: 80px 0;
}

.tp-faq__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  text-align: center;
  margin: 0 0 40px;
  color: var(--tp-text);
}

.tp-faq__list {
  max-width: 800px;
  margin: 0 auto;
}

.tp-faq__item {
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
}

.tp-faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.tp-faq__item summary::-webkit-details-marker { display: none; }

.tp-faq__item summary h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--tp-text);
  margin: 0;
  flex: 1;
}

.tp-faq__chev {
  font-size: 24px;
  color: var(--tp-blue);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.tp-faq__item[open] .tp-faq__chev {
  transform: rotate(45deg);
}

.tp-faq__item p {
  padding: 0 24px 20px;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--tp-text-soft);
}

/* === Bottom CTA === */

.tp-cta-bottom {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--tp-blue) 0%, #4f6cff 100%);
  color: #fff;
}

.tp-cta-bottom__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.tp-cta-bottom__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin: 0 0 16px;
  color: #fff;
}

.tp-cta-bottom__subtitle {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 32px;
  color: rgba(255,255,255,0.9);
}

.tp-cta-bottom__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.button-outline {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 10px;
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.button-outline:hover {
  background: rgba(255,255,255,0.1);
}

/* === Mobile === */

@media (max-width: 1024px) {
  .tp-tiers {
    grid-template-columns: minmax(200px, 1fr) 1fr 1fr 1fr;
    padding: 16px 12px;
  }
  .tp-row {
    grid-template-columns: minmax(200px, 1fr) 1fr 1fr 1fr;
    padding: 12px 12px;
  }
  .tp-cat__header {
    padding: 14px 12px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .tp-tiers {
    grid-template-columns: 200px 110px 110px 110px;
    overflow-x: auto;
    position: sticky;
    top: 0;
    padding: 16px 8px;
    border-radius: 0;
  }
  .tp-tiers__cell {
    padding: 0 6px;
  }
  .tp-tiers__cell--label {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
  }
  .tp-tier__name { font-size: 15px; }
  .tp-tier__desc { font-size: 11px; min-height: 28px; }
  .tp-tier__price-value { font-size: 18px; }
  .tp-tier__cta {
    font-size: 12px;
    padding: 8px 4px;
  }
  .tp-tier__badge {
    font-size: 10px;
    padding: 3px 8px;
    top: -28px;
  }
  .tp-toggle-title { font-size: 14px; margin-bottom: 8px; }
  .tp-billing-btn { font-size: 11px; padding: 6px 10px; }
  .tp-diff-btn { font-size: 11px; padding: 6px 10px; }

  .tp-table {
    overflow-x: auto;
  }
  .tp-cat {
    min-width: 540px;
  }
  .tp-row {
    grid-template-columns: 200px 110px 110px 110px;
    padding: 10px 8px;
    min-width: 540px;
  }
  .tp-row__feat {
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 1;
    font-size: 13px;
    padding-right: 8px;
  }

  .tp-cat__header {
    border-radius: 0;
    margin: 24px 0 0;
    padding: 12px 8px;
    min-width: 540px;
    font-size: 14px;
  }

  .tp-tip__bubble {
    max-width: 220px;
    font-size: 12px;
  }

  .tcell--yes {
    width: 26px;
    height: 26px;
  }
  .tcell--soon {
    font-size: 10px;
    padding: 3px 6px;
  }

  .tp-hero { padding: 24px 0 30px; }
  .fp-tariffs .tp-table-wrap { padding: 20px 0 40px; }
  .tp-cta-bottom__buttons { flex-direction: column; }
}
