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

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;
}
th:last-child {
    display: none;
}
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;
}
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%;
    }
}

@media (max-width: 480px) {
    table {
        display: block;
        font-size: 14px;
    }
    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
 * ------------------------------------------------*/
.day-select {
    -webkit-appearance: none;
    appearance: none;
    max-width: 14rem;
    width: 100%;
    padding: .6rem 2.5rem .6rem 1rem;

    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: .75rem;

    font-size: .95rem;
    line-height: 1.25;
    color: #f5f5f5;
    text-transform: capitalize;
    cursor: pointer;
    transition: all .25s ease;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23f5f5f5' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}
.day-select:hover  { background-color: rgba(255, 255, 255, 0.40); }
.day-select:focus  {
    outline: none;
    box-shadow: 0 0 0 2px #38bdf8;
    border-color: #38bdf8;
}

@media (max-width: 480px) {
    .day-select {
        max-width: 100%;
        font-size: .9rem;
        padding: .55rem 2.25rem .55rem .9rem;
    }
}

select.day-select {
    appearance: none !important;
    backdrop-filter: blur(8px) !important;
    text-transform: capitalize !important;
    color: #fffdfd !important;
    border: 2px solid #7c8c93 !important;
    border-radius: 6px !important;
    padding: .2rem 1rem .2rem 1rem !important;
    font-size: 0.8rem !important;
    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) !important;
    background-repeat: no-repeat !important;
    background-position: right .8rem center !important;
    background-size: 1rem !important;
    font-family: Poppins;
}

/* =========================================================
   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;
  }
}