/* Ticket button and overlay */

#tix-btn {
  position: fixed;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  width: 4.5rem;
  height: 2rem;
  padding: 0;
  font-size: 0.5rem;
  
  /* Animated dashed border using gradients */
  background-color: rgba(248, 250, 252, 0.2);
  background-image: 
    linear-gradient(90deg, rgba(248, 250, 252, 0.9) 50%, transparent 50%),
    linear-gradient(90deg, rgba(248, 250, 252, 0.9) 50%, transparent 50%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.9) 50%, transparent 50%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.9) 50%, transparent 50%);
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-size: 
    12px 1px,
    12px 1px,
    1px 12px,
    1px 12px;
  background-position: 
    0px 0px,
    0px 100%,
    0px 0px,
    100% 0px;
  border: none;
  
  color: rgba(248, 250, 252, 1.0);
  cursor: pointer;
  transition: all 0.2s ease;
  display: none; /* Hidden by default */
  font-family: 'IBM Plex Mono', 'Inter', system-ui, sans-serif;
  font-weight: 600;
}

#tix-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#tix-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.tix-content {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 5%;
}

.tix-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.6rem;
  width: 100%;
}

.tix-action {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tix-action--media {
  justify-content: flex-start;
  padding-left: 0.6rem;
}

.tix-action-thumb {
  width: 2rem;
  height: 2rem;
  object-fit: cover;
  flex: 0 0 auto;
  opacity: 0.9;
}

/* Override special BUY button styling when in tix-actions row */
.tix-actions #buy-link.intro-btn {
  width: auto;
  height: auto;
  font-size: inherit;
  letter-spacing: inherit;
  background: rgba(248, 250, 252, 0.1);
  color: rgba(248, 250, 252, 0.7);
  border: 1px solid rgba(248, 250, 252, 0.3);
  box-shadow: none;
}

.tix-content h2 {
  font-size: 0.85rem;
  letter-spacing: 0.12rem;
  margin: 0;
  color: #f8fafc;
  font-family: 'IBM Plex Mono', 'Inter', system-ui, sans-serif;
  -webkit-text-stroke: 0.5px #0b122c;
  text-shadow:
    0 0 3px #0b122c;
}

.tix-content p {
  font-size: 0.55rem;
  letter-spacing: 0.06rem;
  margin: 0;
  color: rgba(248, 250, 252, 0.9);
  font-family: 'Sofia Sans', 'IBM Plex Mono', 'Inter', system-ui, sans-serif;
  -webkit-text-stroke: 0.5px #0b122c;
  text-shadow:
    0 0 3px #0b122c;
}

#tix-body {
  -webkit-text-stroke: 0.5px #0b122c;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 800px;
  font-family: 'Sofia Sans', 'IBM Plex Mono', 'Inter', system-ui, sans-serif;
  text-align: left;
}

#tix-body p {
  -webkit-text-stroke: 0.5px #0b122c;
  text-shadow:
    0 0 3px #0b122c;
  line-height: 1.4;
  font-size: 0.55rem;
  font-family: 'Sofia Sans', 'IBM Plex Mono', 'Inter', system-ui, sans-serif;
}

/* Mobile: slightly reduce ticket content to avoid clipping on narrow screens (e.g. iPhone) */
@media (max-width: 420px) {
  .tix-content {
    transform: scale(0.92);
    transform-origin: center top;
    padding: 4.5%;
  }

  /* Moderate type reduction to keep text comfortably on screen */
  .tix-content h2 {
    font-size: 0.78rem;
  }

  #tix-body p, .tix-content p {
    font-size: 0.50rem;
    line-height: 1.38;
  }

  /* Ensure long content can scroll instead of overflowing off-screen */
  #tix-overlay {
    align-items: flex-start;
    padding-top: 6vh;
  }

  .tix-content {
    max-width: 92vw;
    max-height: 80vh;
    overflow: auto;
  }
}

/* Thin separator between consecutive paragraphs */
#tix-body p + p {
  border-top: 1px solid rgba(248, 250, 252, 0.2);
  padding-top: 0.4rem;
}

/* Bulgarian language uses Sofia Sans */
[data-lang="BG"] .tix-content h2,
[data-lang="BG"] .tix-content p,
[data-lang="BG"] #tix-body,
[data-lang="BG"] #tix-body p {
  font-family: 'Sofia Sans', 'IBM Plex Mono', system-ui, sans-serif;
}

.close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: rgba(248, 250, 252, 0.5);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
  font-family: 'IBM Plex Mono', monospace;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #f8fafc;
}
