/* `/hosting/porownanie/` - utility comparison page (apps/core/views.py,
   hosting_comparison() - see that function's own module comment). First
   `<table>` in the project; re-skins Bootstrap's own `.table` with KADMIX
   tokens instead of adding a parallel hand-rolled grid, since
   `--bs-border-color`/`--bs-body-color`/`--bs-border-radius` etc. are
   already remapped project-wide (tokens.css) - only the bits Bootstrap
   has no token for (header tint, sticky nav) need rules here. */

/* Just a row of jump links, not a full page section - `.section`'s own
   6rem (`--space-8`) top/bottom padding (layout.css) left far too much
   empty space above/below a single row of buttons (2026-11 review). */
.hosting-compare-nav-section {
  padding: calc(var(--space-8) / 3) 0;
}

.hosting-compare-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
}

.hosting-compare-nav .btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* Sticky only from the desktop breakpoint up - on narrower viewports the
   nav would otherwise sit permanently over content that already has very
   little vertical room to spare (compact header + compact page). */
@media (min-width: 992px) {
  .hosting-compare-nav-section {
    position: sticky;
    top: var(--header-height);
    z-index: 10;
  }
}

.hosting-compare-header {
  max-width: 42rem;
  margin: 0 auto var(--space-5);
  text-align: center;
}

.hosting-compare-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--fs-2xl);
  margin: 0 0 var(--space-3);
}

.hosting-compare-title i {
  color: var(--color-primary);
}

.hosting-compare-table-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  /* "Floats above the page" look requested 2026-11-19 - the table reads
     as a card lifted off the section background instead of a flat grid. */
  box-shadow: var(--shadow-lg);
}

.hosting-compare-table {
  margin: 0;
}

.hosting-compare-table th,
.hosting-compare-table td {
  font-size: var(--fs-sm);
  vertical-align: middle;
  /* Every column centers its values under its own header - easier to
     scan a row of numbers/specs than left-aligned text would be. Only
     the first column (row labels - "Parametr"/"Plan" header, plan name
     or spec name body cells) stays left-aligned, overridden below. */
  text-align: center;
}

.hosting-compare-table thead th:first-child,
.hosting-compare-table th[scope='row'] {
  text-align: left;
}

/* Spec/price values are always a short phrase ("16 GB RAM", "20 TB
   transferu") - nowrap keeps each to one line and lets the column settle
   to its natural (narrow) width, instead of Bootstrap wrapping it
   mid-phrase the moment the table is the least bit tight. */
.hosting-compare-table td {
  white-space: nowrap;
}

.hosting-compare-table th[scope='row'] {
  background-color: var(--color-bg-light);
}

/* Dark header fill (2026-11-19 "сочнее" pass) - `--color-primary-dark`:
   one step darker than `--color-primary-hover` on the brand's own 3-step
   blue scale, but still a visibly blue navy (not `--color-dark`'s
   near-black) - white text contrast here is ~14.7:1, well past AAA. */
.hosting-compare-table thead th {
  background-color: var(--color-primary-dark);
  color: var(--color-text-on-dark);
  font-weight: var(--fw-semibold);
}

/* `--color-text-on-dark-secondary` (70% white) is tuned for the site
   header/footer - over this page's own dark navy it read as flat grey,
   so this scopes a brighter, near-white value to just this tagline
   (2026-11-19), instead of changing that shared token everywhere. */
.hosting-compare-table thead .hosting-compare-tagline {
  color: rgba(255, 255, 255, 0.85);
}

.hosting-compare-table th[scope='row'] {
  font-weight: var(--fw-medium);
  /* Plan name + tagline is a full sentence, so (unlike the data cells)
     it should wrap rather than force the column wide - capped so it
     can't dominate the row width on its own. */
  white-space: normal;
  max-width: 11rem;
  /* Stays visible while the row scrolls horizontally under it - without
     this, identifying "which plan am I looking at" requires scrolling
     back to the left edge every time. */
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 1px 0 0 var(--color-border);
}

/* Price gets emphasis in both table orientations - `.hosting-compare-
   price-row` for the column-per-plan layout (Shared/Mail/Dedicated,
   price is a whole row there) and `.hosting-compare-price-cell` for the
   row-per-plan layout (VPS, price is one column there). An earlier
   `td:nth-child(2)` version of this rule looked equivalent to the cell
   class on VPS's own markup, but silently bolded the first PLAN's entire
   column on the other 3 sections instead, since their 2nd child is that
   plan's first data cell, not a price cell - position alone can't tell
   the two markups apart, hence the explicit classes. */
/* A tint this faint (not `--color-primary-soft`, too saturated to still
   show the cell borders through it) still reads as "this row matters"
   next to plain white rows, without drowning out `table-bordered`'s own
   grid lines - the actual ask behind "еле заметным" (2026-11-19).
   `th` (the "Cena" row label itself) is deliberately left out here - the
   2026-11-19 follow-up asked for that one cell to stay plain, same as
   every other row label, and only the value cells to carry the tint.
   An opaque color, not `rgba(29, 78, 216, 0.03)` - the wrap/table/tr
   chain has no background-color of its own, so a transparent tint here
   composites against whatever's behind it, which differs between a
   plain `.section` (white) and a `.section-alt` one (`--color-bg-light`)
   - Poczta firmowa/Serwery dedykowane rendered visibly bluer than
   Hosting dla stron/Serwery VPS for exactly that reason. The opaque
   value below is that same tint pre-mixed over white, so it now reads
   identically in every section regardless of what's behind the table.
   `td.hosting-compare-price-cell`, not the bare class, on the VPS side -
   Bootstrap's own per-cell background rule (`.table>:not(caption)>*>*`)
   has one more specificity point than a single class, so the bare class
   silently lost to it and VPS's price column stayed white; adding the
   `td` type selector ties that specificity, and this stylesheet loads
   after Bootstrap's so the tie goes to this rule (2026-11-19). */
.hosting-compare-price-row td,
td.hosting-compare-price-cell {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  background-color: #f8fafe;
  color: var(--color-primary-dark);
}

.hosting-compare-tagline {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: var(--color-text-secondary);
}

/* Horizontal scroll has no visual affordance of its own (no visible
   scrollbar on touch devices). Below `md` there's no table to scroll at
   all (see `.hosting-compare-cards`); from `lg` up every section already
   fits without scrolling (checked up to 8 VPS tiers) - so this is only
   shown in between, exactly where it's actually needed. Visibility
   itself is handled by the `d-none d-md-block d-lg-none` utility classes
   on the element, not here. */
.hosting-compare-scroll-hint {
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  margin: var(--space-2) 0 0;
}

/* Mobile fallback for the table itself (`d-md-none` - see
   `.hosting-compare-table-wrap`'s own `d-none d-md-block`): a table with
   this many columns has no good narrow-screen layout, table or
   otherwise, so each plan becomes its own compact card instead. */
.hosting-compare-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Dark header strip + lifted shadow (2026-11-19 "сочнее" pass) - same
   navy fill as the desktop table's header, so card and table read as
   one system; overflow:hidden clips the strip to the card's own
   rounded top corners. */
.hosting-compare-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hosting-compare-card-head {
  display: block;
  text-align: center;
  background-color: var(--color-primary-dark);
  padding: var(--space-3) var(--space-4);
}

.hosting-compare-card-name {
  display: block;
  font-weight: var(--fw-semibold);
  color: var(--color-text-on-dark);
}

.hosting-compare-card-head .hosting-compare-tagline {
  color: rgba(255, 255, 255, 0.85);
}

.hosting-compare-card-body {
  background-color: var(--color-bg);
  padding: var(--space-4);
}

.hosting-compare-card-price {
  text-align: center;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  color: var(--color-primary-dark);
  margin: 0 0 var(--space-3);
}

.hosting-compare-card-specs {
  margin: 0;
}

.hosting-compare-card-spec {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

.hosting-compare-card-spec dt {
  color: var(--color-text-secondary);
  font-weight: var(--fw-regular);
}

.hosting-compare-card-spec dd {
  margin: 0;
  font-weight: var(--fw-medium);
  text-align: right;
}

.hosting-compare-empty {
  color: var(--color-text-secondary);
  margin-top: var(--space-4);
}

.hosting-compare-custom-note {
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  max-width: 32rem;
  margin: var(--space-3) auto 0;
}
