/* TSN Kunye - hotels page only.
   MUST be linked AFTER css/tsnk-scan.css. Everything here is an override of a
   rule in that file, at equal specificity, so cascade order is what makes it win.

   Why this file exists: tsnk-scan.css ends with
     .tsnk-scan table td:first-child { white-space: nowrap }
   which is harmless on the dealership page, where the first column reads
   "Vehicles 1 to 15". On the hotels page the first column carries full sentences,
   so at 390px that rule blew the rate-card tables out to between 604 and 1080px
   wide inside a 374px column. Measured, not guessed. */

@media (max-width: 1000px) {
  .tsnk-scan table { table-layout: fixed; width: 100%; font-size: 13px; }

  /* the actual fix */
  .tsnk-scan table th:first-child,
  .tsnk-scan table td:first-child { white-space: normal; overflow-wrap: anywhere; }

  /* tsnk-scan.css also nowraps the last two columns, which is right for a price
     but wrong for a wide note like "R6.09/km, free within 30km of Kya Sands" */
  .tsnk-scan table th:last-child,
  .tsnk-scan table td:last-child,
  .tsnk-scan table th:nth-last-child(2),
  .tsnk-scan table td:nth-last-child(2) { white-space: normal; }

  /* fixed layout needs explicit widths or the price columns eat the description */
  .tsnk-scan table th:not(:first-child),
  .tsnk-scan table td:not(:first-child) { width: 22%; }

  .tsnk-scan th, .tsnk-scan td { padding: 8px 9px; }
}

@media (max-width: 560px) {
  .tsnk-scan table { font-size: 12px; }
  .tsnk-scan th, .tsnk-scan td { padding: 7px 7px; }
  .tsnk-scan table th:not(:first-child),
  .tsnk-scan table td:not(:first-child) { width: 24%; }
}

/* The Matterport embed on this page is a room, which is portrait-ish on a phone.
   tsnk-scan.css sizes the frame for a showroom. */
@media (max-width: 760px) {
  .tsnk-scan .mpframe { min-height: 380px; }
  .tsnk-scan .mpframe iframe { min-height: 380px; }
}
