/* ==========================================================================
   TempMail PW — grouped pricing (redesign, 2026-11-29)
   ==========================================================================
   Shared by the upgrade popup, the homepage pricing section and the
   logged-in /plans page. Loaded deferred by the theme layout and pushed
   by the /plans page (the user layout does not load tn-header.css, so
   the slider + icon rules below are self-contained on purpose).

   Brand: primary blue var(--primary_color, #1570e8) for checks, links,
   active states and the slider; orange #ff9c37 for crosses.
   Group header: 60-66px, light-blue hover, +/- in a 28px rounded
   square, thin dividers between groups. Rounded corners match the
   current cards (16px table / 20px container).
   ========================================================================== */

/* ---------- Comparison table shell ---------- */
.pg-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pg-table {
  min-width: 900px;
}
.pg-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) repeat(var(--pg-cols, 3), 1fr);
  column-gap: 16px;
  align-items: stretch;
}
.pg-label-cell {
  display: flex;
  align-items: center;
  min-width: 0;
}
.pg-plan-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}

/* ---------- Plan header row ---------- */
.pg-header-row {
  padding-top: 14px; /* clearance for the Current plan badge */
}
.pg-header-label-cell {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  padding-bottom: 10px;
}
.pg-compare-label {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}
.pg-expand-all {
  background: none;
  border: 0;
  padding: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--primary_color, #1570e8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pg-expand-all:hover {
  color: var(--primary_color, #1570e8);
}
.pg-header-cell {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
}
.pg-header-cell.pg-current {
  border: 2px solid var(--primary_color, #1570e8);
  box-shadow: 0 10px 30px rgba(21, 112, 232, .12);
}
.pg-current-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary_color, #1570e8);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.pg-plan-name {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}
.pg-plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 34px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  margin: 0 0 8px;
}
.pg-price-per {
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
}
.pg-plan-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.55;
  margin: 0 0 16px;
}
.pg-plan-btn {
  border-radius: 999px !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  min-height: 44px;
}
.pg-plan-btn.disabled {
  pointer-events: none;
}

/* ---------- API row ---------- */
.pg-api-row {
  padding: 12px;
  margin-top: 12px;
  background: #eef4ff;
  border: 1px solid #dbe7fb;
  border-radius: 12px;
}
/* Inside the table the whole API row is the light-blue card, so the
   slider boxes inside it stay transparent (the popup keeps its own
   light-blue slider box). */
.pg-table .tn-api-plan-box {
  background: transparent;
  border: 0;
  padding: 0;
}
.pg-api-label {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.pg-api-cell {
  align-items: stretch;
}
.pg-api-na {
  font-size: 14px;
  color: #6b7280;
}

/* API slider (self-contained: the /plans layout has no tn-header.css). */
.tn-api-plan-box {
  width: 100%;
  text-align: left;
  background: #eef4ff;
  border: 1px solid #dbe7fb;
  border-radius: 12px;
  padding: 12px;
}
.tn-api-plan-box .form-label {
  font-size: 14px;
  color: #111827;
  margin-bottom: 2px;
}
.tn-api-slider-pill {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.tn-api-plan-slider {
  width: 100%;
  height: 44px;
  background: transparent;
  cursor: pointer;
}
.tn-api-plan-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: #dbe4f0;
}
.tn-api-plan-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: #1570e8;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(17, 24, 39, .25);
  cursor: pointer;
}
.tn-api-plan-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #dbe4f0;
}
.tn-api-plan-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1570e8;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(17, 24, 39, .25);
  cursor: pointer;
}
.tn-api-plan-price,
.tn-api-current-limit {
  font-size: 13px;
}
.tn-api-current-limit {
  color: var(--primary_color, #1570e8);
  font-weight: 600;
}

/* ---------- Feature groups container ---------- */
.pg-groups {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 18px;
}
.pg-group + .pg-group {
  border-top: 1px solid #e5e7eb;
}
.pg-group-header-row {
  padding: 3px 12px;
}
.pg-summary-cell {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.45;
  white-space: nowrap;
}
.pg-summary-cell[hidden] {
  display: none;
}

/* ---------- Group toggle (real <button>, 60-66px) ---------- */
.pg-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 12px;
  text-align: left;
  border-radius: 10px;
  color: #171718;
}
.pg-group-toggle:hover {
  background: #eef4ff;
}
.pg-group-plus {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e8f0fe;
  color: #1570e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.pg-group-toggle[aria-expanded="false"] .pg-group-plus::before {
  content: "+";
}
.pg-group-toggle[aria-expanded="true"] .pg-group-plus::before {
  content: "\2212";
}
.pg-group-title {
  font-size: 16px;
  font-weight: 700;
  color: #171718;
}
.pg-group-count {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
}
.pg-group-toggle[aria-expanded="true"] .pg-group-count {
  display: inline;
}
.pg-group-toggle:focus-visible,
.pg-expand-all:focus-visible,
.pg-plan-btn:focus-visible {
  outline: 2px solid var(--primary_color, #1570e8);
  outline-offset: 2px;
}

/* ---------- Collapsible group body (200ms, grid-rows) ---------- */
.pg-group-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 200ms ease;
}
.pg-group-body > .pg-group-body-inner {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0s linear 200ms;
}
.pg-group-body.open {
  grid-template-rows: 1fr;
}
.pg-group-body.open > .pg-group-body-inner {
  visibility: visible;
  transition: visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .pg-group-body,
  .pg-group-body > .pg-group-body-inner {
    transition: none;
  }
}

/* ---------- Feature rows ---------- */
.pg-feat-row {
  padding: 10px 12px;
  border-top: 1px solid #f1f5f9;
}
.pg-feat-row .pg-label-cell {
  font-size: 15px;
  color: #374151;
}
.pg-value-cell {
  flex-direction: row;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
}
.pg-val-ico {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.pg-val-check {
  background: var(--primary_color, #1570e8);
}
.pg-val-cross {
  background: #ff9c37;
}
.pg-val-text {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

/* ---------- Upgrade popup: synced groups inside the cards ---------- */
.tn-pricing-modal .tn-pricing-card {
  max-height: min(90vh, calc(100vh - 32px));
}
.pg-card-groups {
  margin-top: 6px;
}
/* Popup feature rows: icon + name, left-aligned like the table. */
.tn-pricing-modal .plan-feat {
  justify-content: flex-start;
  text-align: left;
}
.pg-card-group {
  border-top: 1px solid #eef2f7;
  padding: 2px 0;
}
.pg-card-group:first-child {
  border-top: 0;
}
.pg-card-summary {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  padding: 0 4px 10px;
}
.pg-card-summary[hidden] {
  display: none;
}

/* Popup plan name/price sizes (reference screenshot): name 16px, price 36px,
   "/ month" 13px. Scoped to the modal with higher specificity so it beats the
   28px !important in the minified header CSS. NOTE: the price number itself is
   a span (.cursw-price) and the modal CSS forces every span inside .plan-price
   to 13px — so the number needs its own rule, while the "/ month" suffix
   (.fz-15) and the currency note stay small. */
.tn-pricing-modal .tn-pricing-card .plan-title {
  font-size: 16px;
}
.tn-pricing-modal .tn-pricing-card .plan-price {
  font-size: 36px !important;
}
.tn-pricing-modal .tn-pricing-card .plan-price .cursw-price {
  font-size: 36px !important;
}
.tn-pricing-modal .tn-pricing-card .plan-price .fz-15 {
  font-size: 13px;
}
.tn-pricing-modal .tn-pricing-card .plan-price .cursw-note {
  font-size: 12px;
}
