* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #0e0e0e;
  color: #fff;
  overflow: hidden;
}

.app {
  display: flex;
  flex-direction: column;
}

body,
.app {
  height: 100vh;
  height: 100dvh;
  height: var(--app-height);
}

h3,
.btnNotifiche {
  margin-block-start: 1px;
  margin-block-end: 1px;
}

h3 {
  background-image: linear-gradient(269deg, #ffdd00 0%, #ff6c00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}

.btnNotifiche {
  background: linear-gradient(180deg, #cd0000 0%, #000);
  margin-left: 10px;
}

.titolo {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: row;
}

.sticky {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #000;
  pointer-events: auto;
}

header {
  padding: 5px 5px;
  display: flex;
  background: linear-gradient(270deg, #171717 0%, #000);
}

.city-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

select {
  width: clamp(220px, 70vw, 420px);
  font-weight: bold;
  cursor: pointer;
  color: #E0FFFF;
  border: 1px solid #333;
  padding: 5px;
  margin: 8px 8px 10px 5px;
  border-radius: 6px;
  box-shadow: 2px 2px 8px 0px grey;
  background: linear-gradient(180deg, #808080 0%, #000 100%);
}

button {
  font-weight: bold;
  cursor: pointer;
  color: #E0FFFF;
  border: 1px solid #333;
  padding: 5px;
  margin: 8px 8px 10px 5px;
  border-radius: 6px;
  box-shadow: 2px 2px 8px 0px grey;
  background: linear-gradient(180deg, #808080 0%, #000 100%);
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: #2b2b2b;
  color: #777;
  filter: grayscale(0.6);
}

button:hover {
  color: aqua;
  font-weight: bold;
  transition: background 0.2s ease, color 0.2s ease;
  background: linear-gradient(180deg, #808080 0%, #000);
}

.nav-btn.active {
  font-weight: bold;
  border-color: aqua;
  color: #00FA9A;
  font-size: 15px;
  box-shadow: 2px 4px 8px 0px #948801fc;
  background: linear-gradient(180deg, #ff9800 0%, #000);

}

.nav-btn {
  transition: background 0.2s ease, color 0.2s ease;
}

.city-fav {
  cursor: pointer;
  font-size: 12px;
  margin-right: 5px;
}

.city-fav.active {
  color: #ff9800;
}

.city-fav.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.city-fav:hover {
  opacity: 0.35;
  transition: background 0.2s ease, color 0.2s ease;
}

.preferiti-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px;
  margin-bottom: 10px;
}

.preferito-item {
  position: relative;
}

.preferito-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: aqua;
}

#btnPreferiti {
  position: relative;
}

.count-item {
  top: -6px;
  right: -8px;
  background: linear-gradient(270deg, #ddb3b3 0%, #e29898 100%);
  color: #ec0b54;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 20px;
  display: none;
}

.count-item.visible {
  display: inline-block;
}

.count-item.pop {
  transform: scale(1.5);
  transition: transform 0.2s ease;
}


.preferito-item.upcoming {
  border-left: 5px solid #00e676;
  border-bottom: 2px solid #00e676;
  box-shadow: 2px 2px 8px 0px #00e676;
}

.preferito-item.live {
  border-left: 5px solid #ff9800;
  border-bottom: 2px solid #ff9800;
  box-shadow: 2px 2px 8px 0px #ff9800;
}

.preferito-item.expired {
  border-left: 5px solid #ec0b54;
  border-bottom: 2px solid #ec0b54;
  box-shadow: 2px 2px 8px 0px #ec0b54;
  opacity: 0.5;
}

.remove-single {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.remove-single:hover {
  opacity: 0.7;
  background: #dc2828;
}

.view-preferiti .summary,
.view-preferiti .filter-days-wrapper {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
}

.view-programmazione .summary,
.view-programmazione .filter-days-wrapper {
  opacity: 1;
  transform: translateY(0);
}

.filter-days-wrapper {
  overflow-x: auto;
  border-bottom: 1px solid #222;
  transition: opacity 0.02s ease;
  background: linear-gradient(180deg, #171717 0%, #000);
}

.filter-data-list {
  display: flex;
  list-style: none;
  padding: 8px;
  margin: 0;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
}

.filter-data-list::-webkit-scrollbar {
  display: none;
}

.filter-data-list__button {
  padding: 8px 12px;
  border: 1px solid #333;
  color: #fff;
  border-radius: 20px;
  background: linear-gradient(180deg, #7c580a 0%, #000);
}

.filter-data-list__button:hover {
  background: #000;
  color: aqua;
  border: 1px solid aqua;
}

.filter-data-list__button.active {
  border: 2px solid aqua;
  font-weight: bold;
  color: #00FA9A;
  box-shadow: 5px 0px 8px 0px #948801fc;
  background: linear-gradient(180deg, #ff9800 0%, #000);
}

.filter-data-list__button.disabled {
    pointer-events: none;
    color: #767676;
    -webkit-text-decoration-line: line-through;
    text-decoration-line: line-through;
}

.sessions__group-date {
  font-weight: bold;
  margin-bottom: 6px;
  color: aqua;
  border-top: 1px solid aqua;
}

.film {
  margin-bottom: 12px;
}

.sessions__list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sessions__list__item {
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  margin-right: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid aqua;
  box-shadow: 2px 2px 8px 0px grey;
  background: linear-gradient(270deg, #333333 0%, #000);
}

/*.sessions__list__item:hover {
color: aqua;
opacity: 0.7;
}*/

.sessions__list__item.active {
  color: aqua;
  font-weight: bold;
  box-shadow: 8px 5px 8px 0px #00350e;
  border-bottom: 1px solid #00ff45;
  background: linear-gradient(270deg, #523a06 0%, #000)
}

.session-time__start {
  font-size: 16px;
  font-weight: bold;
}

.session-time__end {
  font-size: 12px;
  font-weight: bold;
  color: #aaa;
  margin-left: 6px;
  color: #ec0b54
}


/* =====================
   SUMMARY
===================== */
.summary-remove {
  background: none;
  border: none;
  cursor: pointer;
}

.summary-remove:hover {
  opacity: 0.7;
}

.summary {
  padding: 8px 12px;
  border-top: 1px solid #222;
  background: linear-gradient(0deg, #171717 0%, #000);
}

.summary-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 20px;
  margin: 5px;
  box-shadow: 2px 4px 8px 0px #000;
  background: linear-gradient(90deg, #000 0%, #1d2224);
}

.summary-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-status {
  font-size: 0.75rem;
}

/* STATI */
.summary-status.status-upcoming {
  color: #00e676;
}

.summary-status.status-live {
  color: #ff9800;
}

.summary-status.status-ended {
  color: #ec0b54;
}

.summary-label {
  color: #f2e260;
}

.summary,
.filter-days-wrapper {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.summary::-webkit-scrollbar {
  display: none;
}

/* =====================
   SWIPE PRO LAYOUT
===================== */

.view-change {
  animation: tapFeedback 120ms ease;
}

.swipe-wrapper {
  flex: 1;
  overflow: hidden;
}

.swipe-track {
  display: flex;
  width: 200vw;
  height: 100%;
  will-change: transform;
}

.content {
  flex: 0 0 100vw;
  height: 100%;
  overflow-y: auto;
  padding: 12px;
  touch-action: pan-y;
  background: linear-gradient(180deg, #171717 0%, #000);
}

.view-change {
  animation: tapFeedback 120ms ease;
}

@keyframes tapFeedback {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.985);
  }

  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* =====================
   MODALE GENERICO
===================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  padding: 20px;
  border-radius: 12px;
  max-width: 90%;
  text-align: center;
  color: #fff;
  background: linear-gradient(270deg, #272523 0%, #000);
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
}

.modal-buttons button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #503512;
  color: #fff;
  cursor: pointer;
  min-width: 80px;
}

.modal-buttons button:hover {
  background: #ff9800;
  color: #000;
}

.modal.toast .modal-buttons {
  display: none;
}

.modal.toast .modal-content {
  text-align: center;
  font-size: 15px;
}