/* Each section of the plan page (045 review round 1: a class, not the element inside the page wrapper). */
.billing-section {
  margin-block: var(--space-4);
}

.billing-usage {
  font-size: var(--text-1);
  font-weight: 600;
}

.billing-comparison {
  width: 100%;
  min-width: 40rem;
  table-layout: fixed;
  border-collapse: collapse;
}

.billing-comparison th,
.billing-comparison td {
  width: 25%;
  padding: var(--space-3);
  vertical-align: top;
  text-align: left;
  border: var(--border-w) solid var(--line);
}

/* The plan rows keep the row hover of the shared data table (components.css), which the retired main-wide rule gave them. */
.billing-comparison tbody tr:hover {
  background: var(--bg);
}

.billing-comparison th span {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text--1);
}

.billing-current {
  background: var(--accent-subtle-bg);
  box-shadow: inset 0 0 0 var(--border-w) var(--accent-border);
}


/* Task 052d (N31): what the price line means and that choosing a plan charges nothing, in the ink of the text where it
   is read, never only in a grey help line. */
.billing-price-note,
.billing-no-charge {
  margin-block: 0 var(--space-2);
  color: var(--ink);
}

/* Design «Segnale»: the seats of the plan as one bar under the plan's line. */
.billing-bar { display: block; width: min(100%, 28rem); height: 0.5rem; margin: 0 0 var(--space-2); border: 0; border-radius: var(--radius); background: var(--surface-2); appearance: none; overflow: hidden; }
.billing-bar::-webkit-progress-bar { background: var(--surface-2); }
.billing-bar::-webkit-progress-value { background: var(--accent); }
.billing-bar::-moz-progress-bar { background: var(--accent); }

/* Design «Segnale»: the plans as cards, one per plan, the current one marked by the accent and its seats. */
.billing-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-3); margin: 0 0 var(--space-4); padding: 0; list-style: none; }
/* A plan is a resting card (design-d-spec.md 5): the paper ground, the large radius, the one soft shadow and no border. */
.billing-plan { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); background: var(--surface-1); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.billing-plan h2 { margin: 0; font-size: var(--text-1); }
.billing-plan p { margin: 0; }
.billing-plan.is-current { box-shadow: inset 0 0 0 2px var(--accent); }
.billing-plan-price strong { font-size: var(--text-1); font-weight: 800; }
.billing-plan-seats { font-weight: 600; }
.billing-plan-features { display: grid; gap: var(--ph-space-05); margin: var(--space-1) 0 0; padding: 0 0 0 var(--space-2); color: var(--ink-2); font-size: var(--ph-text-sm); }
.billing-plan-description { color: var(--ink-2); flex: 1; }
.billing-plan-action { align-self: flex-start; margin-top: var(--space-1); }
.billing-plan .billing-bar { width: 100%; }

/* Task 394: the self-service registration (src/modules/signup/views) and the order summary it shares with a renewal.
   One step a page in the public column; a door and a plan are wells on the page tone, never cards inside the panel. */
.signup-entry { margin-top: var(--space-3); text-align: center; }
.signup-entry h2 { margin: 0; font-size: var(--ph-text-md); }
.signup-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--space-2); margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.signup-door { display: grid; gap: var(--space-1); align-content: start; padding: var(--space-2); background: var(--bg); border-radius: var(--radius); }
.signup-door h2 { margin: 0; font-size: var(--text-1); }
.signup-door p { margin: 0; overflow-wrap: break-word; }
.signup-step-count { margin: 0 0 var(--space-2); color: var(--ink-2); font-size: var(--ph-text-sm); font-weight: 600; }
.signup-price-line { font-weight: 600; }
.signup-form { display: grid; gap: var(--space-2); }
.signup-group, .signup-plans { display: grid; gap: var(--space-2); margin: 0; padding: 0; border: 0; min-width: 0; }
.signup-group legend, .signup-plans legend { margin-bottom: var(--space-1); padding: 0; font-weight: 700; }
.signup-plan { display: grid; grid-template-columns: auto 1fr; gap: var(--ph-space-05) var(--space-1); align-items: baseline; padding: var(--space-2); background: var(--bg); border-radius: var(--radius); }
.signup-plan-what { grid-column: 2; margin: 0; color: var(--ink-2); font-size: var(--ph-text-sm); overflow-wrap: break-word; }
.signup-actions { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.signup-exit { margin: var(--space-2) 0 0; color: var(--ink-2); font-size: var(--ph-text-sm); }
.signup-cancel { display: grid; gap: var(--space-1); margin-top: var(--space-3); }
.order-summary { margin: 0 0 var(--space-2); }
.order-summary .order-summary-total { font-size: var(--text-1); font-weight: 800; }
.billing-renewal-link { margin: 0 0 var(--space-2); }

/* In a forced colours mode the shadows are gone: the card keeps an edge and the current plan a heavier one. */
/* Task 192: the export's button stands apart from the line on how long the archive is kept. */
.contract-end-request { margin-top: var(--space-2); }
@media (forced-colors: active) {
  .billing-plan { border: var(--border-w) solid; }
  .billing-plan.is-current { border-width: 3px; }
}
