[hidden] {
  display: none !important;
}

/* messages */
.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: none;
}
.error-message.show {
  display: block;
}
.error-message i {
  color: #dc3545;
  margin-right: 0.75rem;
  font-size: 1.2rem;
}
.error-message p {
  margin: 0;
  color: #721c24;
  display: inline;
}
.success-message p {
  display: inline;
}

/* calendar: colours come from stadium-rental.css*/
.calendar-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* bar and restaurant ordering */
.menu-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.menu-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-blue);
}
.menu-tab.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: var(--white);
}
.menu-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-red);
  border-radius: 4px;
  background: var(--white);
}
.menu-item-info {
  display: flex;
  flex-direction: column;
}
.menu-item-desc {
  color: var(--text-light);
  font-size: 0.9rem;
}
.menu-item-price {
  color: var(--accent-red);
  font-weight: 700;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.qty-control button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-color);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
  color: var(--primary-blue);
}
.qty-control button:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}
.order-summary {
  background: var(--light-gray);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
}
.summary-line.total {
  font-weight: 700;
  color: var(--accent-red);
  border-bottom: 0;
}
.summary-empty {
  margin: 0;
  color: var(--text-light);
}
.submit-button:disabled,
.btn-submit:disabled {
  background: #999;
  cursor: not-allowed;
  transform: none;
}

/* payment page */
.pay-options {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}
.pay-options label,
.terms {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}
.terms {
  margin-bottom: 1.5rem;
}

/* staff portal and POS */
.staff-wrap {
  padding: 2rem;
}
.staff-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.staff-card h2 {
  color: var(--primary-blue);
  font-size: 1.5rem;
}
.staff-card input,
.staff-card select,
.staff-card textarea,
.pos-side input,
.pos-side select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font: inherit;
  margin-bottom: 0.75rem;
}
.staff-card input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.staff-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.staff-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.staff-toolbar #who {
  flex: 1;
  font-weight: 600;
  color: var(--primary-blue);
}
.staff-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.btn-staff {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 0;
  border-radius: 4px;
  background: var(--accent-red);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-staff:hover {
  background: var(--accent-dark-red);
  color: var(--white);
}
.btn-staff.alt {
  background: var(--white);
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
}
.btn-staff.alt:hover {
  background: var(--light-gray);
  color: var(--primary-blue);
}
.btn-staff.no {
  background: var(--primary-blue);
}
.tag {
  padding: 0.1rem 0.6rem;
  border-radius: 99px;
  background: #e3f2fd;
  color: var(--primary-blue);
  font-size: 0.8rem;
  font-weight: 600;
}
.table-wrap {
  overflow-x: auto;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table-wrap th,
.table-wrap td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}
.late {
  color: var(--accent-red);
  font-weight: 700;
}
.actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
dialog {
  border: 0;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 520px;
  width: 92%;
  box-shadow: var(--shadow-lg);
}
.pos-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1300px;
  margin: auto;
}
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}
.pos-tile {
  min-height: 84px;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-red);
  border-radius: 4px;
  background: var(--white);
  font: inherit;
  cursor: pointer;
}
.pos-tile:active {
  background: #fff3f3;
}
.pos-side {
  background: var(--light-gray);
  border-radius: 8px;
  padding: 1.2rem;
  align-self: start;
  position: sticky;
  top: 1rem;
}
.pos-side .btn-staff {
  width: 100%;
  font-size: 1.15rem;
  padding: 1rem;
}
@media (max-width: 800px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

/* mobile navigation */
@media (max-width: 768px) {
  nav .container {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  nav .nav-buttons {
    display: none;
  } /* Login and Sign Up are already in the sidebar */
  nav .logo {
    font-size: 1.1rem;
  }
  nav .logo img {
    height: 40px;
  }
  .sidebar {
    z-index: 102;
    padding-top: 70px;
  }
  .sidebar-overlay {
    z-index: 101;
  }
}

/* desktop navigation */
@media (min-width: 769px) {
  nav .container {
    max-width: none;
    gap: 2rem;
  }
  nav .logo {
    white-space: nowrap;
  }
  nav ul {
    gap: 2rem;
    flex-wrap: nowrap;
  }
  nav ul li a {
    white-space: nowrap;
  }
  nav .nav-buttons {
    margin-left: auto;
    gap: 0.75rem;
    flex-shrink: 0;
  }
  nav .nav-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 110px;
    padding: 0.6rem 1.5rem;
    text-align: center;
    line-height: 1.2;
  }
}

/* merchandise cards */
.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.products-header h2 {
  margin: 0;
  color: var(--primary-blue);
}
.sort-options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sort-options select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-image {
  aspect-ratio: 4/3;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--accent-red);
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-info {
  padding: 1rem;
}
.product-category {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-light);
}
.product-name {
  font-weight: 700;
  color: var(--primary-blue);
  font-size: 1.1rem;
}
.product-description {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0.25rem 0 0.5rem;
}
.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-red);
}
.product-stock {
  font-size: 0.85rem;
  margin: 0.4rem 0 0.8rem;
}
.in-stock {
  color: #2e7d32;
}
.low-stock {
  color: #e65100;
}
.out-of-stock {
  color: #b71c1c;
}
.product-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.btn-quantity {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}
.btn-quantity button {
  background: var(--white);
  border: 0;
  width: 30px;
  cursor: pointer;
  color: var(--primary-blue);
}
.btn-quantity input {
  width: 42px;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font: inherit;
}
.btn-add-cart {
  flex: 1;
  padding: 0.6rem;
  border: 0;
  border-radius: 4px;
  background: var(--accent-red);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
}
.btn-add-cart:hover {
  background: var(--accent-dark-red);
}
.btn-add-cart:disabled {
  background: #999;
  cursor: not-allowed;
}
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.merch-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.merch-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.info-grid .info-card {
  cursor: pointer;
}
