/* GLOBAL RESET */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
}

/* BASE LAYOUT */
.tm-body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: repeating-linear-gradient(
    90deg,
    #cfe1e2 0px,
    #cfe1e2 15px,
    #e6f0f1 15px,
    #e6f0f1 30px,
    #cfe1e2 30px,
    #cfe1e2 45px
  );
  color: #341f1a;
}

/* HEADER */
.tm-header {
  width: 100%;
  background: #341f1a;
  color: #e6f0f1;
  padding: 14px 0;
  box-shadow: 0 2px 6px rgba(52, 31, 26, 0.25);
}

.tm-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tm-logo {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

/* NAV LINK */
.tm-nav-link {
  color: #e6f0f1;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #e6f0f1;
  padding: 6px 12px;
}

.tm-nav-link:hover {
  background: #e6f0f1;
  color: #341f1a;
}

/* MAIN LAYOUT */
.tm-main {
  width: 100%;
  max-width: 900px;   /* prevents boxes from stretching too wide */
  margin: 0 auto;     /* centers everything */
  flex: 1;
  padding: 24px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

/* PANELS */
.tm-panel {
  background: #e6f0f1;
  border: 2px solid #341f1a;
  border-radius: 0;
  padding: 18px 20px;
  box-shadow: 0 3px 8px rgba(52, 31, 26, 0.15);
}

.tm-panel h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
}

/* FORM */
.tm-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tm-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-form-row label {
  font-size: 0.9rem;
  font-weight: 600;
}

.tm-form-row input,
.tm-form-row select {
  padding: 10px 12px;
  border-radius: 0;
  border: 2px solid #341f1a;
  background: #cfe1e2;
  font-size: 0.95rem;
}

/* BUTTONS */
.tm-button {
  padding: 10px 16px;
  border-radius: 0;
  border: 2px solid #341f1a;
  background: #341f1a;
  color: #cfe1e2;
  font-size: 0.95rem;
  font-weight: 600;
}

/* LINKS */
a {
  color: #341f1a;
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

/* EVENT CARDS */
.tm-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tm-event-card {
  padding: 14px 16px;
  border-radius: 0;
  border: 2px solid #cfe1e2;
  background: #fffef9;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tm-event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(52, 31, 26, 0.25);
}

.tm-event-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.tm-event-card p {
  margin: 0;
  font-size: 0.85rem;
}

/* LOAD MORE SPACING */
#load-more {
  margin-top: 24px;
}

/* MAP */
.tm-map {
  width: 100%;
  height: 300px;
  border: 2px solid #341f1a;
  background: #fffef9;
  margin-top: 24px;
  margin-bottom: 32px;
}

/* FOOTER */
.tm-footer {
  width: 100%;
  background: #341f1a;
  color: #e6f0f1;
  padding: 4px 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  border-top: 3px solid #cfe1e2;
  margin-top: 32px;
}

/* SEAT MAP MODAL */
.tm-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(52, 31, 26, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: modalFade 0.25s ease-out;
}

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tm-modal-content {
  width: 95%;
  height: 95%;
  background: #fffef9;
  border: 2px solid #341f1a;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  transform: scale(0.9) translateY(20px);
  animation: modalPop 0.3s ease-out forwards;
}

@keyframes modalPop {
  to {
    transform: scale(1) translateY(0);
  }
}

.tm-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #341f1a;
  color: #e6f0f1;
  padding: 8px 14px;
  border: 2px solid #cfe1e2;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 10000;
}

/* Seat map fits perfectly */
#seatmap-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* BUTTON SPACING ON EVENT PAGE */
.tm-detail-actions {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .tm-main {
    grid-template-columns: minmax(0, 1fr);
  }
}
