/* Aggiungi il cursore a forma di mano sulle intestazioni con gli ID specifici */
#nameHeader:hover, #cityProvinceHeader:hover {
    cursor: pointer;
}

/* Colonna bandiera O.V.: si stringe quanto basta per l'emoji */
th.flag-col,
td.flag-col {
    width: 1%;
    white-space: nowrap;
    padding: 4px 8px;
    text-align: center;
    font-size: 2.8em;
    line-height: 1;
    vertical-align: middle;
}

/* Emoji bandiera come blocco, per far scendere V.O.S. sotto */
td.flag-col span.flag-emoji {
    display: block;
}

/* Etichetta V.O.S. sopra la bandierina */
td.flag-col span.vos-label {
    display: block;
    font-size: 0.85em;
    font-weight: 400;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
}

/* WordPress converte le emoji in <img class="emoji"> e forza 1em —
   sovrascriviamo con selettore più specifico + !important */
td.flag-col img.emoji,
td.flag-col img.wp-smiley {
    height: 2em !important;
    width: 2em !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* Colonna Giorno: si espande con le altre */
th.day-col,
td.day-col {
    min-width: 110px;
}

body {
    font-family: ;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px auto;
    font-size: 18px;
    text-align: center;
    border: none;
}

th, td {
    padding: 12px;
    border: none;
}

thalf {
    padding: 0px;
    font-size: 9px;
    border: none;
}

th {
    text-transform: uppercase;
    text-align: center;
}

/* ATTENZIONE:
   questa regola nasconde SEMPRE l'ultima colonna della tabella.
   La lascio invariata perché è nel tuo CSS attuale. */
th:last-child {
    display: flex;
}

td {
    text-transform: uppercase;
    text-align: left;
    font-size: 16px;
}

td.name {
    text-transform: uppercase;
    font-size: 18px;
    font-weight: 700;
}

input[type="text"] {
    margin: 20px auto;
    padding: 10px;
    font-size: 16px;
    width: 50%;
    display: none;
    border-radius: 9px;
}

.nexo-geo-btn {
    display: block;
    margin: 8px auto 0;
    padding: 10px 20px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3a7bd5 0%, #1a56b0 100%);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    letter-spacing: 0.03em;
    box-shadow: 0 3px 10px rgba(30, 80, 180, 0.25);
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.nexo-geo-btn:hover {
    background: linear-gradient(135deg, #2f6ec4 0%, #1347a0 100%);
    box-shadow: 0 5px 16px rgba(30, 80, 180, 0.35);
}
.nexo-geo-btn:active {
    transform: scale(0.97);
}
.nexo-geo-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

h1 {
    text-align: center;
    color: #fff;
}

p {
    text-align: center;
    font-size: 18px;
    margin-top: 20px;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.time-button {
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
}

.giorni, .ore {
    font-size: 20px;
}

.acquista-button {
    border: 0px solid black;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    text-decoration: none;
    box-shadow: 2px 3px 5px rgba(0, 0, 0.5, 0.3);
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-size: 24px;
    color: #fff;
}

.loading:before {
    content: "";
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.testo-element {
    width: 90%;
    padding: 2px 2px;
    border: 0px solid #ccc;
    border-radius: 3px;
    background-color: #ffffff;
    color: #000000;
    font-size: 12px;
    text-align: center;
}

.testo-cell {
    width: 30%;
    padding: 1px 1px;
    border-radius: 3px;
    color: #f8f4f4;
    font-size: 12px;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    table {
        width: 100%;
        font-size: 14px;
    }
    th, td {
        padding: 8px;
    }
    input[type="text"] {
        width: 90%;
    }
    .nexo-geo-btn {
        width: 90%;
        font-size: 14px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    table {
        display: block;
        font-size: 14px;
    }

#cinemaTable tr[hidden]{ display:none !important; }


    thead {
        display: none;
    }
    tr, td {
        display: block;
        text-align: center;
    }
    td {
        padding: 12px;
        text-align: center;
        border-bottom: none;
    }
    td::before {
        content: attr(data-label);
        float: left;
        text-transform: uppercase;
        font-weight: bold;
        text-align: left;
    }
    td.name {
        font-size: 18px;
        font-weight: bold;
    }

    td.testo-cell {
        width: 100%;
        padding: 1px 1px;
        border-radius: 3px;
        color: #f8f4f4;
        font-size: 12px;
        text-align: center;
        display: none;
    }

    td.cinema-name {
        font-size: 18px;
        font-weight: bold;
    }
    td:last-child {
        border-bottom: 1px solid white;
        padding-bottom: 30px;
    }
    td:not(:last-child) {
        margin-bottom: -13px;
    }
    input[type="text"] {
        width: 68%;
    }
}

/* -------------------------------------------------
 *  SELECT “Giorno” – stile moderno glass-morphism
 * ------------------------------------------------*/
/* -------------------------------------------------
 *  SELECT “Giorno” – base unica (niente duplicati)
 * ------------------------------------------------*/
select.day-select{
  -webkit-appearance: none;
  appearance: none;

  width: 100%;
  max-width: 14rem;

  padding: .55rem 2.4rem .55rem 1rem;

  background-color: rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border: 2px solid #7c8c93;
  border-radius: 12px;

  font-size: .8rem;
  line-height: 1.2;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  color: #fff;

  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: 1.4rem;
}

select.day-select:hover{
  background-color: rgba(255,255,255,.20);
}

select.day-select:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(56,189,248,.35);
  border-color: rgba(56,189,248,.65);
}

/* Mobile fine-tune */
@media (max-width: 480px){
  select.day-select{
    max-width: 100%;
    font-size: .85rem;
    padding: .55rem 2.2rem .55rem .9rem;
    background-position: right .75rem center;
  }
}


/* =========================================================
   DESKTOP MODERNO (solo desktop) — NON TOCCA MOBILE
   ========================================================= */
@media (min-width: 769px){

    /* Tabella come “card” elegante */
    #cinemaTable{
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        overflow: hidden;
        border-radius: 16px;
    }

    /* Header più premium */
    #cinemaTable thead th{
        letter-spacing: .08em;
        font-size: 12px;
        font-weight: 800;
        padding: 14px 16px;
        border-bottom: 1px solid rgba(255,255,255,.10);

        background: rgba(0,0,0,.22);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* Celle più respirate */
    #cinemaTable td{
        padding: 14px 16px;
        font-size: 15px;
        line-height: 1.25;
        vertical-align: middle;
    }

    /* Zebra + hover */
    #cinemaTable tbody tr{
        transition: transform .12s ease, background-color .12s ease;
    }
    #cinemaTable tbody tr:nth-child(even){
        background: rgba(255,255,255,.03);
    }
    #cinemaTable tbody tr:hover{
        background: rgba(255,255,255,.07);
        transform: translateY(-1px);
    }

    /* Separatore più soft */
    #cinemaTable tbody td{
        border-bottom: 1px solid rgba(255,255,255,.10);
    }

    /* Nome cinema come “title” */
    #cinemaTable td.name{
        font-size: 18px;
        font-weight: 900;
        letter-spacing: .01em;
        text-transform: uppercase;
    }

   
    /* Orari: pill più moderni */
    #cinemaTable .button-container{
        justify-content: flex-start;
        gap: 8px;
    }
    #cinemaTable .time-button{
        border-radius: 999px;
        padding: 7px 12px;
        font-size: 13px;
        font-weight: 900;
        border: 1px solid rgba(255,255,255,.18);
        color: #fff;
        transition: transform .12s ease, filter .12s ease;
    }
    #cinemaTable .time-button:hover{
        transform: translateY(-1px);
        filter: brightness(1.06);
    }

    /* ACQUISTA: più premium (non cambia i tuoi colori inline) */
    #cinemaTable .acquista-button{
        display: inline-flex;
        align-items: center;
        justify-content: center;

        border-radius: 14px;
        padding: 10px 14px;

        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;

        border: 1px solid rgba(255,255,255,.18);
        box-shadow: 0 10px 22px rgba(0,0,0,.22);

        transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
    }
    #cinemaTable .acquista-button:hover{
        transform: translateY(-1px);
        filter: brightness(1.05);
        box-shadow: 0 14px 28px rgba(0,0,0,.28);
    }

    /* larghezze stabili per classe — indipendenti dall'ordine/numero colonne */
    #cinemaTable td.name    { width: 28%; } /* Nome Cinema */
    #cinemaTable td.city-col{ width: 26%; } /* Città */
    #cinemaTable td.day-col { width: 20%; } /* Giorno */
    #cinemaTable td.time-col{ width: 14%; } /* Orari */
    #cinemaTable td.link-col{ width: 10%; } /* Acquista */
}

/* =========================================================
   MOBILE MODERNO (solo mobile) — NON TOCCA DESKTOP
   ========================================================= */

/* Tablet & down */
@media (max-width: 768px) {

    /* Input ricerca più moderno */
    input[type="text"]{
        display: block !important;
        width: min(680px, 92%) !important;
        margin: 14px auto !important;
        padding: 12px 14px !important;
        font-size: 16px !important;
        border-radius: 14px !important;
        border: 1px solid rgba(255,255,255,.22) !important;
        background: rgba(255,255,255,.08) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        color: #fff !important;
        outline: none !important;
    }
    input[type="text"]::placeholder{
        color: rgba(255,255,255,.65) !important;
    }
    input[type="text"]:focus{
        box-shadow: 0 0 0 3px rgba(56,189,248,.35) !important;
        border-color: rgba(56,189,248,.65) !important;
    }

    /* Riduci margini tabella su mobile */
    table{
        margin: 14px auto !important;
        font-size: 15px !important;
    }
}

/* Phone */
@media (max-width: 480px) {

    /* Nascondi header (già lo fai) e rendi le righe “card” */
    #cinemaTable{
        display: block !important;
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        background: transparent !important;
    }

    #cinemaTable tbody{
        display: block !important;
        padding: 8px 10px 18px !important;
    }

    #cinemaTable tr{
        display: block !important;
        margin: 12px 0 !important;
        padding: 12px 12px 10px !important;
        border-radius: 18px !important;
        border: 1px solid rgba(255,255,255,.10) !important;
        background: rgba(255,255,255,.06) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 10px 24px rgba(0,0,0,.22);
    }

    /* Celle come “righe” pulite */
    #cinemaTable td{
        display: block !important;
        text-align: left !important;
        padding: 8px 0 !important;
        border: 0 !important;
        font-size: 15px !important;
        text-transform: none !important;
    }

    /* Label (data-label) più leggibile */
    #cinemaTable td::before{
        float: none !important;
        display: block !important;
        margin-bottom: 4px !important;
        font-size: 11px !important;
        letter-spacing: .08em;
        text-transform: uppercase !important;
        opacity: .70 !important;
        font-weight: 700 !important;
    }

    /* “Nome cinema” come titolo card */
    #cinemaTable td.name,
    #cinemaTable td.cinema-name{
        padding-top: 2px !important;
        font-size: 18px !important;
        font-weight: 800 !important;
        letter-spacing: .01em;
        text-transform: uppercase !important;
    }

    /* Riga Città più in evidenza (se presente) */
    #cinemaTable td[data-label*="Città"],
    #cinemaTable td[data-label*="Citta"]{
        font-size: 16px !important;
        font-weight: 600 !important;
        opacity: .95 !important;
    }

    /* Container bottoni orari: più arioso */
    .button-container{
        justify-content: flex-start !important;
        gap: 8px !important;
        margin-top: 6px !important;
    }

    /* Bottoni orari moderni */
    .time-button{
        padding: 8px 10px !important;
        border-radius: 12px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        border: 1px solid rgba(255,255,255,.16) !important;
        background: rgba(255,255,255,.10) !important;
        color: rgba(255,255,255,.92) !important;
    }

    /* Pulsante acquista “vero” */
    .acquista-button{
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 80% !important;
        margin-top: 10px !important;
        padding: 12px 14px !important;
        border-radius: 14px !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        letter-spacing: .06em;
        border: 1px solid rgba(255,255,255,.18) !important;
        box-shadow: 0 12px 26px rgba(0,0,0,.22) !important;
    }

    /* Giorni/ore un filo più equilibrati */
    .giorni, .ore{
        font-size: 16px !important;
    }

    /* Loading più moderno su mobile */
    .loading{
        height: auto !important;
        min-height: 40vh;
        padding: 30px 16px !important;
        text-align: center !important;
        font-size: 16px !important;
        line-height: 1.4;
    }
}