/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/lato-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/lato-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
    background-color: white;
    color: #333;
    font-family: 'Lato';
    margin: 0;
}

h1 {
  text-align: center;
  font-size: 1.5 rem;
}

main {padding: 1em}

button {
  background-color: black;
  color: white;
  border: none;
  text-transform: uppercase;
  margin: 1em;
  padding: 0.5em;
  font-weight: bold;
  border-radius: 0.2em;
}

.menu-button {
  padding: 0.2em 0.5em;
}

.action-button {
  background-color: green;

}

form {
  display: block;
  margin: 1em auto;
  max-width: 40em;
}

label {display: block}
input {
  display: block;
  width: 100%;
  border: 1px solid black;
  border-radius: 0;

}

table {
  border: 1px solid #aaa;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: 100%;
  table-layout: fixed;
}


table tr {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  padding: .35em;
}
table th,
table td {
  padding: .625em;
  text-align: center;
  border: 1px solid #eee
}

table th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#nav-logo {
    max-height: 50px;
    max-width: 15rem;
}

#user-nav form, #user-nav form button {
  display: inline;
  cursor: pointer;
}

@media (min-width: 40rem) {
  #user-nav {float: right}
  #nav-logo {float: left}
  #topnav {margin: 0.5rem 1rem; height: 50px}
}

#motto {
    background-color: #EF7B00;
    color: black;
    font-size: 1.2rem;
    text-align: center;
    margin:0; padding: 0.1em;
    text-transform: uppercase;
    width: 100%
}

footer {
    border-top: 5px solid #EF7B00;
    width: 100%;
    text-align: center;
    font-size: 1.3rem;
    padding: 0.5em 0
}

#footer-logo {height:3em; vertical-align: middle}

footer a {
    display: inline-block;
    margin: 0.2em 2em;
    text-decoration: none;
    color: #333;
}

footer a:hover {color: #007bff}

#copyright {
  background-color: #EF7B00;
  text-transform: uppercase;
  padding: 0.2em
}

#event-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
}

/* Each event */
.event-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    background-color: #fff;
    text-align: center;

}

/* Title styling */
#event-list h2 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    max-width: 300px;
    height: 1.5rem;
    overflow: hidden;
}

.event-image, .event-placeholder {
    height: 300px;
    width: 300px;
    object-fit: cover;
    border-radius: 4px;
}

.event-placeholder {
    background-color: #eee;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    border-radius: 4px;
}

/* Event detail page */

#event-detail-container {
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

#event-detail-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

#event-detail-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#event-detail-left,
#event-detail-tickets {
  width: 100%;
}

#event-gallery {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#event-gallery a img {
  height: auto;
  cursor: pointer;
}

#event-description {
  max-height: 4.5em;
  overflow: hidden;
  position: relative;
}

#event-description.expanded {
  max-height: none;
}

#event-read-more {
  margin-top: 0.5rem;
  cursor: pointer;
  display: hidden;
}


.ticket-holder {
  border-bottom: 1px solid #aaa;
  padding: 0 0 0.5em 0;
}

.ticket-unavailable .item-input button {
  background-color: #777;
}

.ticket-unavailable, .ticket-unavailable .item-input {
  color: #777;
  border-color: #777
}

/* Ensure the container uses flexbox for layout */
.item-input {
    display: flex; /* Enables flexbox */
    align-items: center; /* Vertically centers items if content height varies */
}

/* Set a uniform height for all direct children of the container, based on the input's border height */
.item-input > * {
    height: 100%; /* Ensures all direct children (buttons and input) have equal height to the container */
    display: flex; /* Enables flexbox on each child for potential inner content alignment */
    align-items: center; /* Vertically centers content in each child if needed */
}

.item-input input {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Ensure buttons are only as tall as the border of the input, not its contents */
.item-decrement, .item-increment {
    height: 100%; /* Full height of the container (which is based on the input's border) */
    display: flex; /* Enables flexbox for potential inner content alignment in buttons */
    align-items: center; /* Vertically centers any content in the button */
    justify-content: center; /* Horizontally centers any content in the button */
}

.item-decrement, .item-increment {
  color: white;
  background-color: black;
  cursor: pointer;
  font-weight: bold;
  border: none;
}


/* Responsive Layouts */

@media (min-width: 600px) {
  #event-detail-main {
    flex-direction: row;
  }
  #event-read-more {
    display: none;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  #event-detail-main {
    justify-content: space-between;
  }
  #event-detail-left,
  #event-detail-tickets {
    flex: 1;
  }
  #event-description {
    max-height: none;
  }

}

@media (min-width: 1024px) {
  #event-detail-main {
    gap: 2rem;
  }

  #event-detail-left {
    flex: 2;
  }

  #event-detail-tickets {
    flex: 1;
  }
}


.ticket {margin: 1em; padding:1em; border: 1px solid #aaa}

@media print {
  .ticket {
    break-before: always
  }
}
