/* Price tables v2 — compact real tables, fit on mobile */

.price-table-wrap {
  position: relative;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.875rem;
  line-height: 1.38;
  table-layout: auto;
}

.price-table caption {
  caption-side: top;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0 0 0.45rem;
  color: var(--pr-glass-text-soft, var(--text-soft, #c6d2e6));
}

.price-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.38rem 0.55rem;
  vertical-align: bottom;
  white-space: nowrap;
  border-bottom: 2px solid var(--pr-glass-line, rgba(255, 255, 255, 0.14));
}

.price-table tbody td {
  padding: 0.38rem 0.55rem;
  vertical-align: top;
  border-bottom: 1px solid var(--pr-glass-line, rgba(255, 255, 255, 0.08));
}

.price-table tbody tr:last-child td {
  border-bottom: 0;
}

.price-table th:last-child,
.price-table td:last-child {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  width: 1%;
}

.price-table th:first-child,
.price-table td:first-child {
  text-align: left;
  min-width: 0;
}

/* White cards (theme-cinematic) — no dark cell bands */
body.theme-cinematic main.theme-editorial .price-table-section .price-table thead th,
body.theme-cinematic main.theme-editorial .price-table-section .price-table tbody td,
body.theme-cinematic main.theme-editorial section#prices .price-table thead th,
body.theme-cinematic main.theme-editorial section#prices .price-table tbody td {
  background: transparent !important;
  color: #1f2937 !important;
  border-color: rgba(0, 0, 0, 0.09) !important;
}

body.theme-cinematic main.theme-editorial .price-table-section .price-table caption,
body.theme-cinematic main.theme-editorial section#prices .price-table caption {
  color: #4b5563 !important;
}

body.theme-cinematic main.theme-editorial .price-table-section .price-table td:last-child,
body.theme-cinematic main.theme-editorial .price-table-section .price-table th:last-child,
body.theme-cinematic main.theme-editorial section#prices .price-table td:last-child,
body.theme-cinematic main.theme-editorial section#prices .price-table th:last-child {
  color: #1f2937 !important;
}

body.theme-cinematic main.theme-editorial .price-table-section .price-table:has(thead th:nth-of-type(3)) td:last-child,
body.theme-cinematic main.theme-editorial section#prices .price-table:has(thead th:nth-of-type(3)) td:last-child {
  color: #4b5563 !important;
}

body.theme-cinematic main.theme-editorial .price-table-section .price-table tbody tr:hover td,
body.theme-cinematic main.theme-editorial section#prices .price-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.03) !important;
}

/* Main price page — 3 columns */
.price-table:has(thead th:nth-of-type(3)) {
  min-width: 520px;
}

.price-table:has(thead th:nth-of-type(3)) th:nth-child(2),
.price-table:has(thead th:nth-of-type(3)) td:nth-child(2) {
  text-align: right;
  white-space: nowrap;
  width: 1%;
  font-weight: 600;
}

.price-table:has(thead th:nth-of-type(3)) th:last-child,
.price-table:has(thead th:nth-of-type(3)) td:last-child {
  text-align: left;
  white-space: normal;
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.42;
  color: var(--pr-glass-text-soft, var(--text-soft, #c6d2e6));
  min-width: 10rem;
  width: auto;
}

.price-table-section .content-card,
section#prices .content-card {
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

.price-table-section .price-note,
section#prices .price-note {
  margin-top: 0.65rem;
  padding: 10px 12px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

@media (min-width: 768px) {
  .price-table-section .content-card,
  section#prices .content-card {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .price-table-wrap {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
  }

  .price-table {
    font-size: 0.9rem;
  }

  .price-table thead th {
    padding: 0.42rem 0.75rem;
  }

  .price-table tbody td {
    padding: 0.45rem 0.75rem;
  }
}

@media (min-width: 992px) {
  .price-table-section .container,
  section#prices .container {
    max-width: min(var(--container, 1320px), 1140px);
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .price-table-section .content-card,
  section#prices .content-card {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-top: 1.1rem !important;
    padding-bottom: 1.1rem !important;
  }

  .price-table-section .section-head-compact,
  .price-table-section .text-center.mb-4 {
    margin-bottom: 0.75rem !important;
  }

  /* 2 columns — fit screen, no horizontal scroll */
  .price-table-wrap:has(.price-table:not(:has(thead th:nth-of-type(3)))) {
    overflow-x: visible !important;
    touch-action: auto !important;
    margin: 0;
  }

  .price-table-wrap:has(.price-table:not(:has(thead th:nth-of-type(3))))::after {
    display: none;
  }

  .price-table:not(:has(thead th:nth-of-type(3))) {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
    font-size: 0.74rem;
    line-height: 1.32;
  }

  .price-table:not(:has(thead th:nth-of-type(3))) thead th,
  .price-table:not(:has(thead th:nth-of-type(3))) tbody td {
    padding: 0.28rem 0.3rem !important;
  }

  .price-table:not(:has(thead th:nth-of-type(3))) thead th {
    font-size: 0.58rem;
    letter-spacing: 0.02em;
    white-space: normal;
    line-height: 1.2;
  }

  .price-table:not(:has(thead th:nth-of-type(3))) th:first-child,
  .price-table:not(:has(thead th:nth-of-type(3))) td:first-child {
    width: 68%;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    padding-right: 0.35rem !important;
  }

  .price-table:not(:has(thead th:nth-of-type(3))) th:last-child,
  .price-table:not(:has(thead th:nth-of-type(3))) td:last-child {
    width: 32%;
    font-size: 0.7rem;
    padding-left: 0.2rem !important;
    white-space: nowrap;
  }

  /* 3 columns — scroll inside card */
  .price-table-wrap:has(.price-table:has(thead th:nth-of-type(3))) {
    overflow-x: auto !important;
    touch-action: pan-x !important;
    margin: 0 -4px;
    padding-bottom: 1px;
  }

  .price-table-wrap:has(.price-table:has(thead th:nth-of-type(3)))::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    background: linear-gradient(to right, transparent, rgba(13, 20, 34, 0.82));
  }

  body.theme-cinematic .price-table-wrap:has(.price-table:has(thead th:nth-of-type(3)))::after {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.96));
  }

  .price-table:has(thead th:nth-of-type(3)) {
    min-width: 440px;
    font-size: 0.72rem;
  }

  .price-table thead {
    display: table-header-group !important;
  }

  .price-table tbody {
    display: table-row-group !important;
  }

  .price-table tbody tr {
    display: table-row !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    grid-template-columns: unset !important;
  }

  .price-table tbody td {
    display: table-cell !important;
    border-bottom: 1px solid var(--pr-glass-line, rgba(255, 255, 255, 0.08)) !important;
  }

  body.theme-cinematic .price-table tbody td {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
  }

  .price-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  body.theme-cinematic main.theme-editorial .price-table thead th {
    background: #fff !important;
  }

  .price-table:has(thead th:nth-of-type(3)) thead th,
  .price-table:has(thead th:nth-of-type(3)) tbody td {
    padding: 0.28rem 0.35rem !important;
  }

  .price-table:has(thead th:nth-of-type(3)) thead th {
    font-size: 0.56rem;
  }

  .price-table:has(thead th:nth-of-type(3)) td:last-child {
    font-size: 0.68rem;
    min-width: 7.5rem;
  }

  .price-table caption {
    font-size: 0.7rem;
    padding-bottom: 0.3rem;
  }
}

body.theme-light .price-table-wrap:has(.price-table:has(thead th:nth-of-type(3)))::after {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.92));
}

body.theme-light .price-table thead th {
  border-bottom-color: var(--border, rgba(0, 0, 0, 0.12));
}

body.theme-light .price-table tbody td {
  border-bottom-color: var(--border, rgba(0, 0, 0, 0.08));
}
