/* Global reset */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
}

header {
  background: #4a90e2;
  color: #fff;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header img{
  width: 30%;
}

#sidebarToggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
}

#user-status {
  text-align: center;
  margin-top: 0.5rem;
}

.container {
  display: flex;
}

/* Sidebar Styles */
#sidebar {
  width: 250px;
  background: #fff;
  padding: 1rem;
  border-right: 1px solid #ccc;
  transition: transform 0.3s ease;
  position: relative;
  overflow-y: auto; /* Allows vertical scrolling if content is too long */
  word-wrap: break-word; /* Breaks long words to prevent overflow */
  overflow-wrap: break-word; /* Modern alternative to word-wrap */
}

#sidebar h3,
#sidebar p,
#sidebar div {
  max-width: 100%; 
  box-sizing: border-box; 
}

#sidebar .event-description { 
  white-space: pre-wrap;
  word-break: break-word; 
}

#sidebar.collapsed {
transform: translateX(-100%);
}

.sidebar-header {
display: flex;
justify-content: space-between;
align-items: center;
}

#sidebarClose {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
}

main {
flex: 1;
padding: 1rem;
}

#guestSignInBtn {
  background-color: #4a90e2;
  color: #fff;
  border: solid 1px;
  border-radius: 5px;
  padding: 5px;
}

#user-status {
  margin-top: 0.5rem;
}

section {
  margin: 2rem auto;
  max-width: 800px;
  background: #fff;
  padding: 1.5rem;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

form input,
form textarea,
form button {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form button {
  background: #4a90e2;
  color: #fff;
  border: none;
  cursor: pointer;
}

form button:hover {
  background: #357ab8;
}

#eventList {
  list-style: none;
  padding: 0;
}

#eventList li {
  border-bottom: 1px solid #ccc;
  padding: 1rem 0;
}

#organizerPaymentEventSelect {
  margin-bottom: 10px;
}

#category {
  background-color: #8bbdf7;
}
#volunteerRole {
  background-color: #8bbdf7;
}
#volunteerEvent {
  background-color: #8bbdf7;
}

#eventList li {
  line-height: 30px;
}
#eventList button {
  background-color: coral;
  color: #fff;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  margin: 5px 0;
}
#eventList a {
  text-decoration: none;
  color: red;
}

#logoutBtn {
  background-color: coral;
  color: #fff;
  padding: 5px;
}

#scanNextButton {
  background-color: #357ab8;
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  margin: 5px 0;
}

#eventSelect {
  width: 98%;
  padding: 10px 5px;
  border: 1px solid #ccc;
  border-radius: 5px;

}

#deleteEventBtn {
  background-color: red;
}

#event-reports button {
  margin: 10px 0;
  padding: 10px;
  background-color: #4a90e2;
  color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#reportEventSelect {
  width: 98%;
  padding: 10px 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.footer p {
  text-align: center;
}

#myEventSelect {
  background-color: #4a90e2;
  padding: 10px;
  margin-right: 10px;
  border-radius: 5px;
  border: 0;
}
#myEventSelect option{
  background-color: #fff;
}

#viewTransactionsBtn {
  background-color: #4a90e2;
  padding: 10px;
  border-radius: 5px;
  border: 0;
}

#transactionsResult {
  margin: 10px 0px;
}

#transactionsResult table {
  width: auto;
}
.terms {
  display: flex;
  gap: 30px;
}
.terms input, label {
  align-items: center;
}
#termsCheckbox {
  width: 40px;
}
.ticket-category { 
  display:flex; 
  gap:.5rem; 
  align-items:center; 
  margin-bottom:.35rem; 
}
.ticket-category .cat-name { 
  flex:1 1 60%; 
  min-width:160px; 
  padding:8px; 
}
.ticket-category .cat-price { 
  flex:0 0 140px; 
  padding:8px; 
}
.ticket-category .cat-remove { 
  flex:0 0 auto; 
  padding:.45rem .7rem; 
  white-space:nowrap; 
}

.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #e0e0e0;
  color: #666;
  border: 1px solid #ccc;
  padding: 6px 10px;
  border-radius: 4px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  header {
    padding: 0.75rem;
  }
  header img{
    width: 50%;
  }
  .container {
    flex-direction: column;
    position: relative;
  }
  #sidebar {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1000;
    transform: translateX(-100%);
    overflow-x: hidden; /* Prevent horizontal scrollbar on mobile */
  }
  #sidebar.active {
    transform: translateX(0);
  }

  section {
    margin: 1.5rem auto;
    padding: 1rem;
  }
  form input,
  form textarea,
  form button {
    padding: 0.65rem;
  }
  .footer p {
    font-size: smaller;
  }

  #transactionsResult table {
    width: auto;
  }

  #myEventSelect {
    margin: 5px 0px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }
  header img{
    width: 50%;
  }
  section {
    margin: 1rem;
    padding: 0.75rem;
  }
  .footer p {
    font-size: smaller;
  }

  #transactionsResult table {
    width: auto;
  }

  #myEventSelect {
    margin: 5px 0px;
    width: 90%;
  }
  #organizerBankEventSelect {
    margin: 5px 0px;
    width: 90%;
  }
  #organizerPaymentEventSelect {
    margin: 5px 0px;
    width: 90%;
  }
}