/* HS CPT - Mobile responsive overrides (no desktop changes) */
@media (max-width: 720px) {

  /* Keep embed flush inside ULV portal cards */
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode,
  .hs-cpt-embed {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .ulv-card,
  .hs-cpt-embed .ulv-card {
    border-radius: 16px !important;
    padding: 14px !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .ulv-card__head,
  .hs-cpt-embed .ulv-card__head {
    margin-bottom: 12px !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .ulv-card__title,
  .hs-cpt-embed .ulv-card__title {
    font-size: 16px !important;
    letter-spacing: 0.14em !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .ulv-card__sub,
  .hs-cpt-embed .ulv-card__sub {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  /* Inputs: bigger tap targets, tighter spacing */
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-form-row,
  .hs-cpt-embed .hspt-form-row {
    gap: 6px !important;
    margin-bottom: 12px !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .ulv-select,
  .hs-cpt-embed .ulv-select {
    padding: 12px 12px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode textarea.ulv-select,
  .hs-cpt-embed textarea.ulv-select {
    min-height: 130px !important;
  }

  /* Primary button: full width on mobile */
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-actions,
  .hs-cpt-embed .hspt-actions {
    justify-content: stretch !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-actions .ulv-btn,
  .hs-cpt-embed .hspt-actions .ulv-btn {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 12px !important;
    letter-spacing: 0.14em !important;
  }

  /* Filter pills: 2-column grid so they don't overflow */
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-filterbar,
  .hs-cpt-embed .hspt-filterbar {
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-filterbar__row,
  .hs-cpt-embed .hspt-filterbar__row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(160px, 1fr)) !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .ulv-pill,
  .hs-cpt-embed .ulv-pill {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    align-items: center !important;
    padding: 12px 12px !important;
    font-size: 12px !important;
    letter-spacing: 0.08em !important;
    white-space: normal !important;
    line-height: 1.12 !important;
    min-height: 50px !important;
    height: auto !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    hyphens: manual !important;
  }

  /* Tickets list: mobile-first (no sideways scroll) */
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-tablewrap,
  .hs-cpt-embed .hspt-tablewrap {
    overflow: hidden !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table,
  .hs-cpt-embed .hspt-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table thead th,
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table tbody td,
  .hs-cpt-embed .hspt-table thead th,
  .hs-cpt-embed .hspt-table tbody td {
    padding: 12px 10px !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Keep only Subject + Status on mobile */
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table thead th:nth-child(n+3),
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table tbody td:nth-child(n+3),
  .hs-cpt-embed .hspt-table thead th:nth-child(n+3),
  .hs-cpt-embed .hspt-table tbody td:nth-child(n+3) {
    display: none !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table thead th:nth-child(1),
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table tbody td:nth-child(1),
  .hs-cpt-embed .hspt-table thead th:nth-child(1),
  .hs-cpt-embed .hspt-table tbody td:nth-child(1) {
    width: 62% !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table thead th:nth-child(2),
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-table tbody td:nth-child(2),
  .hs-cpt-embed .hspt-table thead th:nth-child(2),
  .hs-cpt-embed .hspt-table tbody td:nth-child(2) {
    width: 38% !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-subject,
  .hs-cpt-embed .hspt-subject {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-chip,
  .hs-cpt-embed .hspt-chip {
    max-width: 100% !important;
    white-space: normal !important;
    line-height: 1.12 !important;
    padding: 8px 10px !important;
    text-align: center !important;
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* Pager: stack nicely */
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-pager,
  .hs-cpt-embed .hspt-pager {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-pager .ulv-btn,
  .hs-cpt-embed .hspt-pager .ulv-btn {
    width: 100% !important;
  }

  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-pager__right,
  .hs-cpt-embed .hspt-pager__right {
    text-align: center !important;
  }

  /* Thread bubbles: more width */
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-msg,
  .hs-cpt-embed .hspt-msg {
    max-width: 92% !important;
  }
}

@media (max-width: 420px) {
  .ulv-portal-lite.hs-cpt-embed.ulv-support-shortcode .hspt-filterbar__row,
  .hs-cpt-embed .hspt-filterbar__row {
    grid-template-columns: 1fr !important;
  }
}
