/* css/sections/ticket-system.css */

.ticket-section {
  padding: 4rem 0;
  position: relative;
}

.ticket-header {
  margin-bottom: 3rem;
  margin-top: 0;
}

.ticket-subheader {
  margin-bottom: 2rem;
}

.ticket-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* --- CALENDAR MODULE --- */
.calendar-module {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 4px; /* Slight roundness */
}

.calendar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.calendar-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cal-date {
  min-width: 80px;
  text-align: right;
  line-height: 1.2;
}

.cal-content {
  flex-grow: 1;
}

.cal-title {
  display: block;
  font-family: var(--font-main); /* HEADLINE FONT */
  font-weight: 700;
  font-size: var(--sz-m);
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

.cal-desc {
  font-family: var(--font-text); /* TEXT FONT */
  font-size: var(--sz-s);
  margin: 0;
  opacity: 0.8;
  line-height: 1.4;
}

/* --- TICKET PHASES MODULE --- */
.ticket-phases-module {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ticket-phase-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--color-dark);
  padding: 1.5rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  position: relative;
  /* Default opaque border */
  border-left: 4px solid var(--color-dark);
}

.ticket-phase-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ticket-phase-card.active-phase {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: #4cd964; /* Green pop */
  box-shadow: 0 0 15px rgba(76, 217, 100, 0.2);
  transform: scale(1.02);
  padding: 2rem; /* Adjusted padding for better balance with internal button */
}

.ticket-phase-card.inactive {
  background: rgba(0, 0, 0, 0.2);
  opacity: 1; /* Reset opacity on card so children can control it */
  border-color: rgba(255, 255, 255, 0.05);
}

/* Grayscale and fade everything inside the inactive cards EXCEPT the gold dates */
.ticket-phase-card.inactive > *:not(.phase-header) {
  filter: grayscale(1);
  opacity: 0.5;
}

.ticket-phase-card.inactive .phase-header .phase-badge {
  filter: grayscale(1);
  opacity: 0.5;
}

.ticket-phase-card.inactive .phase-header .phase-dates {
  color: var(--color-gold) !important;
  opacity: 1;
  font-weight: bold;
}

.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap; /* Ensure safe wrapping instead of overflow */
  gap: 0.5rem;
}

.phase-badge {
  padding: 0.2rem 0.6rem;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: var(--sz-s); /* 1rem approx */
  border-radius: 2px;
  letter-spacing: 1px;
}

.bg-gold {
  background-color: var(--color-gold);
  color: var(--color-dark);
}

.bg-pink {
  background-color: var(--color-pink);
  color: var(--color-white);
}

.bg-blue {
  background-color: var(--color-blue, #57a0d3); /* Fallback if var missing */
  color: var(--color-white);
}

/* --- ACTIONS --- */
.ticket-actions {
  text-align: center;
  margin-top: 2rem;
}

/* PDF Link styling */
.pdf-link-container {
  text-align: right;
  margin-top: 0.1rem;
}

.pdf-link {
  opacity: 0.5;
  text-decoration: none;
  font-size: 0.7rem;
  font-style: italic;
  display: inline-block;
  cursor: pointer;
}

.pdf-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* We use .btn-ticket from buttons.css now */

.phase-dates {
  font-size: 0.9rem;
  opacity: 0.9;
}

.phase-desc {
  font-family: var(--font-main);
  font-size: var(--sz-m);
  margin: 0.5rem 0 1rem 0;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.note-limit {
  font-weight: normal;
  opacity: 0.9;
  font-style: italic;
  font-size: 0.8rem;
}

.note-residents {
  margin-top: 1rem;
  opacity: 0.8;
  font-style: italic;
}

.fees-disclaimer {
  margin-top: 1rem;
  text-align: center;
  font-style: italic;
  font-size: 0.65rem; /* Make it smaller */
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Center items vertically */
  margin-bottom: 0.3rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.price-row:last-of-type {
  border-bottom: none;
}

.ticket-type {
  font-family: var(--font-text);
  font-size: var(--sz-s);
  font-weight: 700;
}

.ticket-price {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: var(--sz-m);
  white-space: nowrap; /* Prevent "200" and "DKK" from breaking into multiple lines */
}

.ticket-phase-card.active-phase .ticket-price {
  font-size: 2.5rem !important; /* Massive price pop */
  color: #4cd964; /* Green price text */
  text-shadow: 0 0 10px rgba(76, 217, 100, 0.3);
}

/* Make sure the old and new price stay aligned nicely on the active card */
.ticket-phase-card.active-phase .price-row > div {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 1rem;
}

.ticket-phase-card.active-phase .price-original {
  font-size: 1.4rem;
  margin-right: 0;
}

.price-original {
  color: #ff3b30;
  margin-right: 5px;
  text-decoration: line-through;
  opacity: 0.8;
}

.price-large {
  font-size: 1.2rem;
}

/* Helper for green text (savings) */
.u-text-green {
  color: #4cd964;
  font-weight: bold;
  margin-right: 8px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .ticket-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Compact inactive phases on mobile while keeping info visible */
  .ticket-phase-card:not(.active-phase) {
    padding: 1rem;
    border-left-width: 2px;
  }

  .ticket-phase-card:not(.active-phase) .phase-header {
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
  }

  .ticket-phase-card:not(.active-phase) .phase-desc {
    font-size: calc(var(--sz-s) * 0.9);
    margin: 0.2rem 0 0.5rem 0;
  }

  .ticket-phase-card:not(.active-phase) .price-row {
    margin-bottom: 0.2rem;
    padding-bottom: 0.2rem;
  }

  .ticket-phase-card:not(.active-phase) .ticket-type,
  .ticket-phase-card:not(.active-phase) .ticket-price {
    font-size: 0.85rem;
  }
}
