/* This module is a plain table, not a card -- no border, radius, shadow,
   or background here. Background/border/etc. are handled by HubSpot's
   native section settings in the page editor. Only layout and the
   section-level spacing fields apply to this container. */
.product-rates-section {
  padding-top: var(--section-padding-top-mobile, 32px);
  padding-bottom: var(--section-padding-bottom-mobile, 32px);
  margin-top: var(--section-margin-top-mobile, 0);
  margin-bottom: var(--section-margin-bottom-mobile, 0);
}

@media (min-width: 768px) {
  .product-rates-section {
    padding-top: var(--section-padding-top-desktop, 60px);
    padding-bottom: var(--section-padding-bottom-desktop, 60px);
    margin-top: var(--section-margin-top-desktop, 0);
    margin-bottom: var(--section-margin-bottom-desktop, 0);
  }
}

/* Heading typography is set inline via styles.typography.heading_font.css */
.rates-heading {
  margin: 0 0 20px 0;
}

/* Table wrapper allows horizontal scroll on narrow desktop widths without
   engaging the mobile card transform below 768px.
   BugHerd #34/#35: this used to carry its own margin-bottom: 20px,
   unconditionally -- but the space below the table only needs to exist
   when something (the disclaimer/footer links) actually follows it.
   .rates-footer's own margin-top: 20px already produces the identical
   gap via normal sibling margin collapsing when it renders, and is
   gated in module.html to skip rendering entirely when it has no
   content -- so this rule was pure duplication that left a fixed gap
   behind an empty footer. #}
.rates-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Base desktop table styles */
.responsive-rates-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.responsive-rates-table thead tr {
  background-color: var(--table-header-bg, #004b49);
  text-align: left;
}

/* The background-color/color: inherit override needed here to stop Pike's
   base stylesheet from hiding the header row's colors lives in the shared
   src/css/hubdb-tables.css, loaded via require_css in module.html -- see
   that file for the full explanation. */
.responsive-rates-table th,
.responsive-rates-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f3;
}

.responsive-rates-table tbody tr:nth-child(even) {
  background-color: var(--row-stripe-color, transparent);
}

/* MOBILE RESPONSIVE TRANSFORM (< 768px): table rows become stacked
   key/value cards using the data-label attribute set in module.html */
@media (max-width: 767px) {
  /* BugHerd #36: on mobile the table is stacked into separate cards, each with
     its own background. The <table> keeps its desktop white background, which
     showed as a white strip around and under the cards, so drop it here. */
  .responsive-rates-table {
    background: transparent;
  }

  .responsive-rates-table,
  .responsive-rates-table thead,
  .responsive-rates-table tbody,
  .responsive-rates-table th,
  .responsive-rates-table td,
  .responsive-rates-table tr {
    display: block;
  }

  .responsive-rates-table thead {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .responsive-rates-table tr {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #ffffff;
    padding: 10px;
  }

  .responsive-rates-table td {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }

  .responsive-rates-table td:last-child {
    border-bottom: none;
  }

  .responsive-rates-table td::before {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: 700;
    content: attr(data-label);
  }
}

.rates-empty-state {
  color: #666666;
  font-style: italic;
}

/* Footer links & disclosure text */
.rates-footer {
  margin-top: 20px;
}

.rates-footer .disclaimer-text {
  margin: 0 0 12px 0;
}

.rates-footer .footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.rates-footer .footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cta-color, #00796b);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.rates-footer .footer-links--no-underline a {
  text-decoration: none;
}

.rates-footer .footer-links a:hover,
.rates-footer .footer-links a:focus-visible {
  color: var(--cta-color-hover, #004b49);
}

/* Visibility toggles (settings.hidden_*) */
@media (max-width: 767px) {
  .rates--hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .rates--hide-tablet {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .rates--hide-desktop {
    display: none !important;
  }
}
