/* Tabelle su telefono: tabella larga, si scorre con il dito a destra e sinistra,
   con l'indicatore "← scorri →" sopra. Funziona insieme a js/tables-scroll.js */

.tbl-hint { display: none; }

@media (max-width: 700px) {

  /* indicatore sopra la tabella */
  .tbl-hint {
    display: block;
    width: fit-content;
    margin: 16px auto 8px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #111;
    background: var(--primary, var(--gold, #d4af37));
    padding: 8px 20px;
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(212, 175, 55, .55);
    pointer-events: none;
    user-select: none;
    animation: tblHintBlink 1.1s ease-in-out infinite;
  }

  /* quando l'utente ha già fatto scorrere la tabella, la scritta smette di lampeggiare */
  .tbl-hint.tbl-done {
    animation: none;
    opacity: .55;
    font-size: .8rem;
    padding: 4px 14px;
    box-shadow: none;
  }

  @keyframes tblHintBlink {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: .35; transform: scale(1.06); }
  }

  @media (prefers-reduced-motion: reduce) {
    .tbl-hint { animation: none; }
  }

  /* niente doppio indicatore dove lo aggiunge già style.css */
  .table-wrapper::before,
  .table-scroll-wrap::before,
  .food-table-wrap::before,
  .gi-table-wrap::before,
  .compare-table-wrap::before,
  .data-table-wrap::before { content: none !important; display: none !important; }

  /* il riquadro scorre in orizzontale */
  .tbl-scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    margin-top: 0 !important;
  }

  /* la tabella resta larga: le colonne hanno spazio e il testo non si spezza a metà parola */
  .tbl-scroll > table {
    width: 100% !important;
    min-width: 600px !important;
    table-layout: auto !important;
  }

  .tbl-scroll > table th,
  .tbl-scroll > table td {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    min-width: 120px;
    vertical-align: top;
  }

  /* prima colonna: parole in orizzontale, mai verticali */
  .tbl-scroll > table th:first-child,
  .tbl-scroll > table td:first-child {
    min-width: 110px;
    white-space: normal !important;
  }
}

@media print {
  .tbl-hint { display: none !important; }
  .tbl-scroll { overflow: visible !important; }
  .tbl-scroll > table { min-width: 0 !important; }
}
