/* user.css - Base styling for user-facing pages */

:root {
  --primary-color: #4285f4;
  --accent-color: rgb(255, 255, 255);
  --dark-color: #333;
  --light-gray: #f5f5f5;
  --medium-gray: rgba(119, 119, 119, 0.78);
  --white: #ffffff;
  --red: rgba(241, 27, 27, 0.57);
  --success: #4CAF50;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--light-gray);
  color: var(--dark-color);
  line-height: 1.6;
}

.main-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Banner and headers */
.banner {
  width: 100%;
  height: clamp(120px, 25vh, 200px);
  background-size: cover;
  background-position: center;
  border-radius: 12px 12px 0 0;
}

.page-title {
  text-align: center;
  margin: 20px 0;
  font-size: clamp(24px, 5vw, 36px);
  color: var(--dark-color);
}

/* Event display components */
.event-header {
  background-color: var(--medium-gray);
  color: var(--white);
  padding: 15px;
  text-align: center;
  border-radius: 0;
}

.event-title {
  font-size: clamp(18px, 5vw, 40px);
  margin: 5px 0;
  font-family: Impact, sans-serif;
  text-transform: uppercase;
}

.event-venue {
  font-size: clamp(14px, 3vw, 24px);
  color: var(--dark-color);
  margin: 5px 0;
}

.event-time-container {
  background-color: rgba(163, 162, 162, 0.5);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  border-radius: 0 0 12px 12px;
}

.time-box {
  display: flex;
  border: 2px solid var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.time-label {
  background-color: var(--white);
  color: var(--dark-color);
  padding: 8px 15px;
  font-weight: bold;
  width: 30%;
  text-align: center;
  font-family: Impact, sans-serif;
  text-transform: uppercase;
}

.time-value {
  background-color: #000;
  color: var(--accent-color);
  width: 200%;
  padding: 8px 15px;
  text-align: center;
  font-family: Impact, sans-serif;
}

.time-value.end {
  color: var(--red);
}

/* Forms and inputs */
input, select, button, textarea {
  font-family: inherit;
  font-size: 16px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #3367d6;
}

button.secondary {
  background-color: #f1f1f1;
  color: var(--dark-color);
}

button.secondary:hover {
  background-color: #ddd;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: white;
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

tr:last-child td {
  border-bottom: none;
}

/* Card styles */
.card {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }

.success-message {
  background-color: var(--success);
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0;
}

.error-message {
  background-color: var(--red);
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0;
}

/* Event tiles for landing page */
.event-listing {
  display: grid;
  grid-template-columns: 2fr;
  gap: 20px;
  padding-top: 20px;
}


.event-tile {
  position: relative;
  height: 225px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s
}

.event-tile:hover {
  transform: scale(1.07);
}

.event-tile-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
}

.event-dates {
  position: relative;
  top: 0;
  left: 0;
  background-color: rgba(0,0,0,0.8);
  color: var(--accent-color);
  padding: 15px 20px;
  font-family: Impact, sans-serif;
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.4;
  width: 150px;
  height: 90px;
  box-sizing: border-box;
  border-radius: 0 0 50px 0;
}

.event-name {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: rgba(255,255,255,0.85);
  color: var(--dark-color);
  padding: 15px;
  width: fit-content;
  min-width: 65%;
  min-height: 20%;
  max-width: 80%;
  max-height: 45%;
  border-radius: 20px 0 0 0;
  font-family: Impact, sans-serif;
  font-size: clamp(16px, 4vw, 28px);
  text-transform: uppercase;
  text-align: center;
  overflow: visible;
  box-sizing: border-box;
  line-height: 0.9;
}

.ticket-cta {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 10px;
  transition: transform 0.2s;
}

.ticket-null {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #FB8C00;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 10px;
  transition: transform 0.2s;
}

.ticket-sale-end {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--red);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 10px;
  transition: transform 0.2s;
}



/* Ticket download section */
.download-list {
  list-style: none;
  padding: 0;
}

.download-item {
  background-color: white;
  margin-bottom: 10px;
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
}

.download-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  width: 100%;
}

.download-link:hover {
  text-decoration: underline;
}

.download-link:before {
  content: "📄";
  margin-right: 10px;
  font-size: 20px;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .event-listing {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 20px;
  }

  /* Target the <a> elements which are the actual children of event-listing */
  .event-listing > a:nth-child(1) {
    grid-column: 1 / span 9 !important; /* 100% width */
  }

  /* Row 1 (items 2-3) */
  .event-listing > a:nth-child(2) {
    grid-column: 1 / span 5 !important; /* 60% width */
  }
  .event-listing > a:nth-child(3) {
    grid-column: 6 / span 4 !important; /* 40% width */
  }

  /* Row 2 (items 4-5) */
  .event-listing > a:nth-child(4) {
    grid-column: 1 / span 4 !important; /* 40% width */
  }
  .event-listing > a:nth-child(5) {
    grid-column: 5 / span 5 !important; /* 60% width */
  }

  /* Row 3 (items 6-7) */
  .event-listing > a:nth-child(6) {
    grid-column: 1 / span 5 !important; /* 60% width */
  }
  .event-listing > a:nth-child(7) {
    grid-column: 6 / span 4 !important; /* 40% width */
  }

  /* Row 4 (items 8-9) */
  .event-listing > a:nth-child(8) {
    grid-column: 1 / span 4 !important; /* 40% width */
  }
  .event-listing > a:nth-child(9) {
    grid-column: 5 / span 5 !important; /* 60% width */
  }

  /* Row 5 (items 10-12) */
  .event-listing > a:nth-child(10) {
    grid-column: 1 / span 3 !important; /* 33% width */
  }
  .event-listing > a:nth-child(11) {
    grid-column: 4 / span 3 !important; /* 33% width */
  }
  .event-listing > a:nth-child(12) {
    grid-column: 7 / span 3 !important; /* 33% width */
  }

  /* All subsequent rows (items 13+) */
.event-listing > a:nth-child(3n+13) {
  grid-column: 1 / span 3 !important; /* 33% width */
}
.event-listing > a:nth-child(3n+14) {
  grid-column: 4 / span 3 !important; /* 33% width */
}
.event-listing > a:nth-child(3n+15) {
  grid-column: 7 / span 3 !important; /* 33% width */
}


  .event-time-container {
    flex-direction: row;
    justify-content: space-between;
  }

  .time-box {
    width: 49%;
  }

  .form-row {
    display: flex;
    gap: 20px;
  }

  .form-group {
    flex: 1;
  }

  .button-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  .button-group button {
    width: auto;
  }
}