/* Tema dark */
:root {
  --highlight: #c0383c;
  --accent-color: #c0383c;
  --right-column-bg: #dddcd8;
  --text-color: #333333;
  --address-color: #666666;
}
/* Chrome, Edge and Safari */
*::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
*::-webkit-scrollbar-track {
  border-radius: 5px;
  background-color: #222222;
}

*::-webkit-scrollbar-track:hover {
  background-color: #222222;
}

*::-webkit-scrollbar-track:active {
  background-color: #222222;
}

*::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background-color: #364F3E;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #364F3E;
}

*::-webkit-scrollbar-thumb:active {
  background-color: #364F3E;
}
body {
  color: var(--text-color);
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  background: linear-gradient(90deg, #222 0%, #393A30 100%) !important;
}

/* Colonna locandina */
#poster-column {
  height: 100vh;
  overflow: hidden;
  position: relative;
}

#poster-column img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
  position: relative;
  content: url('../images/movieposter.jpg');
}
#poster-mobile {
  display:none;
}

/* Contenitore principale */
#main-container {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 32px 32px 6px 32px;
  box-sizing: border-box;
}

/* Autocomplete */
#autocomplete-container {
  position: relative;
  max-width: 515px;
  width: 100%;
  border-radius:5px;
}

.autocomplete-list {
  list-style: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  gbborder: 1px solid #333;
  background: #ffffff;
  width: 100%;
  max-width: 515px;
  position: absolute;
  z-index: 99;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

.autocomplete-list li {
  padding: 10px 10px;
  cursor: pointer;
  color: var(--text-color);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.autocomplete-list li:hover,
.autocomplete-list li.selected {
  background-color: #f0f0f0;
  cursor: pointer;
}

.autocomplete-list li.no-result {
  font-style: italic;
  color: #999;
  cursor: default;
}

.autocomplete-list li.no-result:hover {
  background-color: transparent;
}

.autocomplete-list li.no-city {
  font-style: italic;
  color: #c7c7c7;
  cursor: default;
  font-size: 0.85rem;
}

.autocomplete-list li.no-city:hover {
  background-color: transparent;
}

/* Form di ricerca */
#city-ajax {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px 12px 35px;
  margin-bottom: 0px;
  border: 1px solid #fff;
  background: #fff url(https://cdn.jsdelivr.net/npm/bootstrap-icons/icons/search.svg) no-repeat right 10px center;
  color: var(--text-color);
  font-size: 1rem;
  border-radius: 3px;
  max-width: 515px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
}

#city-ajax:focus {
  border-color: #374F3E;
  box-shadow: 0 0 5px rgba(55, 79, 62, 0.5);
}

#day-tabs {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #444 #121212;
  padding: 16px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  justify-content: flex-start;
}

#day-tabs::-webkit-scrollbar {
  height: 8px;
}

#day-tabs::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 3px;
}

#day-tabs::-webkit-scrollbar-track {
  background-color: #121212;
}

.day-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 60px;
  height: 70px;
  border:none;
  background-color: #121212;
  border-radius: 10px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 0;
  overflow: hidden;
}

.day-button .day-name {
  width: 100%;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  margin: 0;
  padding: 4px 0;
}

.day-button .day-number {
  line-height: 1.2em;
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
  color: #fff;
  padding: 4px 0;
}

.day-button .day-month {
  display: none;
}

.day-button:hover {
  transform: translateY(-3px);
  background-color: #fff;
}

.day-button:hover .day-name{
  background: linear-gradient(90deg, #f56600 0%, #ff9246 100%) !important;
  color: #fff;
}
.day-button:hover .day-number{
  color: #222;
}

.day-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.day-button.active {
  background-color: #fff;
}
.day-button.active .day-name{
  background: linear-gradient(90deg, #f56600 0%, #ff9246 100%) !important;
}
.day-button.active .day-number{
  color: #222;
}

/* Risultati showtimes */
.cinema-result {
  background: linear-gradient(90deg, #18231c 0%, #233329 100%);
  border: 5px solid #374F3E;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
  padding: 24px;
  max-width: 100%;
  border-radius: 10px;
}

.cinema-info {
  gap: 10px;
}

.cinema-details {
  display: flex;
  justify-content: space-between;
}

.cinema-details .theater-name {
  padding-right: 10px;
}

.cinema-details .theater-info-right {
  padding-left: 10px;
  padding-top: 5px;
}

.website-button {
  display: flex;
  flex: 0;
  align-self: flex-start;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background-color: #444;
  border: none;
  border-radius: 3px;
  color: #fff;
  font-size: 0.7rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.3s ease;
}

.website-button:hover {
  transform: translateY(-3px);
}

.time-box {
  display: inline-block;
  padding: 4px 8px;
  background-color: #f2dea5;
  border-radius: 3px;
  color: #fff;
  font-size: 0.8rem;
  margin: 2px;
  font-weight: 600;
}

.theater-name {
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.theater-name a{
  color: #fff;
  text-decoration: none;
}

.theater-sub {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 16px;
  position: relative;
}

.theater-info-right {
  display: flex;
}

.theater-sub .theater-address {
  flex: 1;
}

.theater-info-right {
  display: flex;
}

.theater-distance {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.map-link {
  color: #fff;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  display: inline-flex;
  margin-left: 8px;
}

.map-link:hover {
  color: #f2dea5;
  transform: translateY(-3px);
}

.showtimes-wrapper {
  width: 100%;
  margin-top: 16px;
}

.showtimes-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.time-box {
  display: inline-block;
  padding: 8px 16px;
  background-color: #f2dea5;
  border-radius: 4px;
  text-decoration: none;
  color: #000;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  margin-right: 12px;
  margin-bottom: 12px;
  font-weight: 700;
}

.time-box:not(.disabled):hover {
  background-color: #fff;
  color: #000;
  transform: translateY(-3px);
}

.time-box.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.no-result {
  font-style: italic;
  color: #aaa;
  margin-top: 10px;
  font-size: 1em;
  padding: 20px;
  text-align: center;
}
.no-result i{
  font-size:2em;
  color: #ccc;
  padding-bottom: 20px;
}

.error {
  color: var(--accent-color);
  font-weight: bold;
  margin-top: 10px;
}

/* Lista scrollabile */
#ajax-result {
  padding-bottom: 6px;
}

/* Indicatore di caricamento */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--right-column-bg);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.loading-text {
  font-size: 0.9rem;
  color: #aaa;
  font-family: 'Montserrat', sans-serif;
}

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

.copyright-text {
  text-align: center;
  font-size: 0.75rem;
  color: #636354;
  margin-top: 40px;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.4;
}

.copyright-text a{
  color: #636354;
}
.copyright-text a:hover{
  color: #7e7e6d;
}

/* Ottimizzazione per mobile */
@media (min-width: 1024px) {
    #main-container {
        width: 50%;
        margin-right: 0;
    }

    #day-tabs {
        width: 100%;
        margin: 0 0 0px 0;
        padding: 20px 0 20px 0;
        box-sizing: border-box;
    }
}

@media (max-width: 1024px) {
    body {
        display: block;
        height: auto;
        margin: 0;
        padding: 0;
        background: linear-gradient(90deg, #222 0%, #393A30 100%) !important;
    }

    #day-tabs {
      width: 100%;
      margin: 0 0 15px 0;
      box-sizing: border-box;
      position: relative;
      left: 0;
      padding: 15px;
      background-color: #222;
    }
    #ajax-result {
      padding-left: 10px;
      padding-right: 10px;
    }
    .fixed {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 15px !important;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
      z-index: 99999;
    }
    .placeholder {
        display: none;
        width: 100%;
        height: 90px;
    }
    #poster-column {
      display:none;
    }

    #poster-mobile {
      display: flex;
      justify-content: space-between;
      width: 100%;
      line-height: 0;
      position: static;
      height: auto;
      background-color: #222;
    }
    #poster-mobile img {
      max-width: 120px;
      height: auto;
      display: block;
    }
    .mob-stamps img{
      max-height: 36px;
      width: auto;
    }
    .mob-head-style{
      line-height:normal;
      padding-right: 20px;
      margin-inline-end: 20px;
    }
    .mob-poster{
      padding: 20px
    }
    .mob-info{
      color: #fff;
      flex-grow: 1;
    }

    #main-container {
      width: 100%;
      padding: 0px;
      box-sizing: border-box;
      position: static;
      height: auto;
    }

    #main-container form{
      padding: 10px;
      background-color: #222;
    }

    .cinema-result {
      padding: 15px;
    }

    .cinema-details .theater-info-right {
        padding-top: 0px;
    }

    .theater-name {
      font-size: 1rem;
      margin-bottom: 4px;
    }

    .theater-sub {
      font-size: 0.8rem;
    }

    .time-box {
      font-size: 0.85rem;
      padding: 6px 12px;
    }




}
.search-container {
  position: relative;
  max-width: 515px;
}

.geolocation-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #000;
  cursor: pointer;
  z-index: 1;
}

.geolocation-icon:hover {
  color: #666;
}
.autocomplete-message {
  padding: 10px;
  text-align: center;
  color: #666;
  font-style: italic;
  background-color: #f9f9f9;
  border-bottom: 1px solid #ddd;
}