/**
 * @file
 * Styles for the Verzió 2026 Festival Timetable Grid Schedule.
 */

:root {
  --color-grid-header: hsla(0, 0%, 85%, 1);
  --color-grid-header-dark: #c0c0c0;
  --color-grid-empty: #c4a5ab;
  --color-grid-border: #1a1a1a;
  --color-card-bg: #ffffff;
}

.verzio-schedule-page {
  width: 100%;
  box-sizing: border-box;
}

/* Font utility */
.schedule-font-verzio {
  font-family: var(--font-body);
  letter-spacing: -0.02em;
}

/* Header & Controls Card */
.schedule-controls-card {
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
}

.schedule-top-bar {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--color-border);
  padding: 16px var(--main-padding);
}

@media (min-width: 992px) {
  .schedule-top-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.schedule-main-title {
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin: 0;
  color: #000000;
}

/* Controls row (Filters & Date) */
.schedule-controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: flex-end;
  margin-inline: var(--main-padding);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

@media (min-width: 640px) {
  .schedule-controls-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .schedule-controls-grid {
    grid-template-columns: 4fr 3fr 3fr;
  }
}

.schedule-control-group:not(:last-of-type) {
  border-right: 1px solid var(--color-border);
}

.schedule-control-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 100;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px;
}

.schedule-select-wrapper {
  position: relative;
  width: 100%;
}

.schedule-select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-left: none;
  border-right: none;
  font-family: var(--font-navigation);
  font-weight: 100;
  font-size: 1rem;
  padding: 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  color: #000000;
}

.schedule-select:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #000000;
}

.schedule-select-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
  background: url("../images/chevron--black.png") no-repeat center center;
  border: none;
  width: 16px;
  height: 16px;
}

.schedule-prev-next-btns {
  display: flex;
}

.schedule-nav-btn {
  flex: 1;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-left: none;
  font-size: 1rem;
  font-weight: 100;
  text-transform: uppercase;
  font-family: var(--font-navigation);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--color-dark);
  background-color: var(--color-white);

  & span {
    font-family: var(--font-navigation);
  }

  & .prev-next-btn {
    background: url("../images/chevron--black.png") no-repeat center center;
    border: none;
    width: 16px;
    height: 16px;
  }

  & .prev {
    transform: rotate(180deg);
  }
}

.schedule-nav-btn:last-of-type {
  border-right: none;
}

.schedule-nav-btn:hover {
  background-color: var(--color-dark);
  color: var(--color-white);
}

/* Horizontal Date Pills */
.schedule-date-pills {
  display: flex;
  align-items: center;
  margin-inline: var(--main-padding);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.schedule-date-pills::-webkit-scrollbar {
  display: none;
}

.schedule-pill-btn {
  white-space: nowrap;
  padding: 16px;
  font-size: 1rem;
  font-weight: 100;
  font-family: var(--font-navigation);
  border: none;
  border-right: 1px solid var(--color-border);
  background-color: var(--color-white);
  color: var(--color-dark);
  cursor: pointer;
  transition: all 0.15s ease;
}

.schedule-pill-btn:hover {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.schedule-pill-btn.is-active {
  background-color: var(--color-dark);
  color: var(--color-white);
}

/* Timetable Grid Wrapper & Table */
.schedule-timetable-wrapper {
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  background-color: #ffffff;
  padding-inline: var(--main-padding);
}

.schedule-timetable-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  width: 100%;
}

.schedule-grid-container {
  display: inline-grid;
  min-width: calc(100% - 2px);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

/* Header Cells */
.schedule-header-cell {
  background-color: var(--color-grid-header);
  color: #000000;
  font-weight: 100;
  text-transform: uppercase;
  font-family: var(--font-navigation);
  box-sizing: border-box;
}

.schedule-date-header {
  grid-column: 1 / -1;
  padding: 16px var(--main-padding);
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
}

.schedule-cinema-header {
  text-align: center;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
  letter-spacing: -0.01em;
}

.schedule-room-header {
  text-align: center;
  padding: 12px;
  font-size: 1rem;
  font-weight: 100;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
}

/* Sticky Time Column */
.schedule-sticky-time {
  position: sticky;
  left: 0;
  z-index: 30;
  background-color: var(--color-grid-header);
  box-shadow: 3px 0 6px rgba(0, 0, 0, 0.12);
}

.schedule-time-axis-header {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.schedule-time-slot {
  background-color: var(--color-grid-header);
  border-bottom: 1px solid var(--color-grid-border);
  color: #111111;
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-sizing: border-box;
  padding-inline: 8px;
}

.schedule-time-slot.half-hour {
  font-size: 0.8rem;
  color: #4b5563;
  justify-content: end;
}

.schedule-time-slot:last-of-type {
  border-bottom: none;
}

/* Room Track Column */
.schedule-room-track {
  background-color: var(--color-grid-empty);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.schedule-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--color-border);
  pointer-events: none;
}

.schedule-grid-line.is-hour {
  border-bottom: 1px solid var(--color-border);
}

/* Borders between columns and cinemas */
.schedule-border-cinema {
  border-right: 1px solid var(--color-border) !important;
}

.schedule-border-room {
  border-right: 1px solid var(--color-border);
}

/* Screening White Card */
.schedule-card {
  position: absolute;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  padding: 6px 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease;
  z-index: 10;
  box-sizing: border-box;
}

.schedule-card:hover {
  background-color: #fafafa;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  z-index: 20;
}

.schedule-card-title-main {
  font-weight: 500;
  font-size: 1rem;
  color: #000000;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.schedule-card-title-sub {
  font-size: 0.8rem;
  color: var(--color-split-slate);
  font-weight: 400;
}

.schedule-card-specs {
  font-size: 0.8rem;
  color: var(--color-split-slate);
}

.schedule-card-time {
  font-size: 1rem;
  font-weight: 600;
}

.schedule-badge-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.schedule-badge-sub,
.schedule-badge-age {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.schedule-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
}

.schedule-icon-tw {
  width: 14px;
  height: 14px;
}

.schedule-icon-qa {
  width: 20px;
  height: 20px;
}

/* Modal Window */
.schedule-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.schedule-modal-backdrop.is-open {
  display: flex;
}

.schedule-modal-dialog {
  background-color: #ffffff;
  border: 2px solid var(--color-grid-border);
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  box-sizing: border-box;
}

.schedule-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  font-weight: 800;
  color: #71717a;
  cursor: pointer;
  padding: 4px 8px;
}

.schedule-modal-close:hover {
  color: #000000;
}

.schedule-modal-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #000000;
  margin: 0.25rem 0 0.15rem;
  line-height: 1.2;
}

.schedule-modal-subtitle {
  font-size: 0.85rem;
  color: #71717a;
  font-style: italic;
  margin: 0 0 1rem;
}

.schedule-modal-table {
  background-color: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
}

.schedule-modal-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e4e4e7;
}

.schedule-modal-row:last-child {
  border-bottom: none;
}

.schedule-modal-row-label {
  color: #71717a;
}

.schedule-modal-row-val {
  font-weight: 700;
  color: #000000;
  text-align: right;
}

.schedule-modal-actions {
  display: flex;
  gap: 0.75rem;
}

.schedule-modal-link-btn {
  flex: 1;
  text-align: center;
  background-color: #000000;
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.schedule-modal-link-btn:hover {
  background-color: #27272a;
  color: #ffffff;
}

.schedule-modal-cancel-btn {
  padding: 0.65rem 1.25rem;
  background-color: transparent;
  border: 2px solid var(--color-grid-border);
  border-radius: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.schedule-modal-cancel-btn:hover {
  background-color: #f4f4f5;
}
