.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 6px;
}

.event-tag {
  display: inline-block;
  padding: 1px 8px 2px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #fff;
  white-space: nowrap;
}

.event-container .cancel-btn {
  display: none;
}
.event-container .join-btn {
  display: block;
}
.event-container.joined .cancel-btn {
  display: block;
}
.event-container.joined .join-btn {
  display: none;
}

.weekday-badge {
  display: inline-block;
  padding: 1px 8px;
  padding-bottom: 3px;
  border-radius: 10px;
  font-size: 0.85em;
  color: white;
}
.weekday-badge--monday {
  background-color: #3b82f6;
}
.weekday-badge--tuesday {
  background-color: #14b8a6;
}
.weekday-badge--wednesday {
  background-color: #22c55e;
}
.weekday-badge--thursday {
  background-color: #ffca00;
}
.weekday-badge--friday {
  background-color: #f97316;
}
.weekday-badge--saturday {
  background-color: #ef4444;
}
.weekday-badge--sunday {
  background-color: #a855f7;
}
.weekday-badge--thursday {
  color: black;
}

.seats {
  margin-top: 10px;
  max-width: 360px;
  font-size: 14px;
}
.seats .seats-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.seats .seats-free {
  color: #2e7d32;
  font-weight: 600;
  white-space: nowrap;
}
.seats .seats-bar {
  position: relative;
  display: flex;
  height: 12px;
  border: 1px solid #c4c4c4;
  border-radius: 6px;
  background-color: #e0e0e0;
}
.seats .seat {
  flex: 1;
  position: relative;
}
.seats .seat + .seat {
  border-left: 1px solid rgba(0, 0, 0, 0.18);
}
.seats .seat:first-child {
  border-radius: 5px 0 0 5px;
}
.seats .seat:last-child {
  border-radius: 0 5px 5px 0;
}
.seats .seat.taken {
  background-color: #43a02e;
}
.seats .seat.min::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -2.5px;
  width: 4px;
  height: calc(100% + 8px);
  border-radius: 2px;
  background-color: #ffca00;
  z-index: 1;
}
.seats .seats-fill {
  flex: none;
  border-radius: 5px;
  height: 100%;
  background-color: #43a02e;
}
.seats.full .seats-free {
  color: #c62828;
}
.seats.full .seat.taken, .seats.full .seats-fill {
  background-color: #c62828;
}

.difficulty {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}
.difficulty .difficulty-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #c4c4c4;
  background-color: #e0e0e0;
}
.difficulty--1 .difficulty-pip.filled {
  border-color: #43a02e;
  background-color: #43a02e;
}
.difficulty--2 .difficulty-pip.filled {
  border-color: #8bc34a;
  background-color: #8bc34a;
}
.difficulty--3 .difficulty-pip.filled {
  border-color: #ffca00;
  background-color: #ffca00;
}
.difficulty--4 .difficulty-pip.filled {
  border-color: #f97316;
  background-color: #f97316;
}
.difficulty--5 .difficulty-pip.filled {
  border-color: #c62828;
  background-color: #c62828;
}

.rules-hint {
  display: inline-block;
  margin: 2px 0;
  padding: 2px 10px;
  border-radius: 12px;
  background-color: #fff8d6;
  color: #6b5800;
  font-size: 14px;
}

.status-badge {
  font-size: 14px;
  border-radius: 15px;
  padding: 3px 10px;
}
.status-badge.confirmed {
  background-color: green;
  color: white;
}
.status-badge.waiting {
  background-color: #ffca00;
  color: black;
}
.status-badge.finished {
  background-color: #565656;
  color: white;
}

#modal-success {
  display: block;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  background-color: white;
  height: 100%;
  text-align: center;
  font-size: 180px;
  color: rgb(67, 160, 46) !important;
  font-weight: bold;
  padding-top: 70px;
}

#event-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  height: 100dvh;
  padding: 91px 16px 16px;
  background-image: url(../../images/background_pattern2.png);
  background-repeat: repeat;
  background-attachment: fixed;
}

.event-page-main {
  display: flex;
  gap: 16px;
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

.event-join-panel, .event-page-card {
  min-height: 0;
  padding: 20px;
  border-radius: 15px;
  background-color: #ffffff;
  color: #373737;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.event-page-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.event-page-card:only-child {
  max-width: 900px;
  margin: 0 auto;
}
.event-page-card.passed {
  background-color: #e3e3e3;
}
.event-page-card.passed .seats .seats-bar {
  background-color: #cfcfcf;
}
.event-page-card.passed .seats .seat.taken, .event-page-card.passed .seats .seats-fill {
  background-color: #8a8a8a;
}

.event-page-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: none;
}
.event-page-header h1 {
  font-size: 26px;
  margin-bottom: 6px;
}
.event-page-header .status-badge {
  display: inline-block;
  margin-bottom: 8px;
}

.event-page-info {
  flex: 1;
  min-width: 0;
}

.event-page-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 15px;
  flex-shrink: 0;
}

.event-page-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 16px;
}
.event-page-body > * + * {
  margin-top: 16px;
}

.event-page-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding-top: 12px;
  border-top: 1px solid #dee2e6;
}
.event-page-description p {
  margin: 0;
}
.event-page-description h2, .event-page-description h3 {
  margin: 8px 0 4px;
}
.event-page-description h2 {
  font-size: 22px;
}
.event-page-description h3 {
  font-size: 18px;
}
.event-page-description ul, .event-page-description ol {
  margin: 0;
}

.event-join-panel {
  flex: 0 0 380px;
  overflow-y: auto;
}
.event-join-panel h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.joined-state {
  display: none;
  text-align: center;
  padding-top: 24px;
}

.joined-icon {
  font-size: 96px;
  line-height: 1;
  color: #43a02e;
  font-weight: bold;
}

.event-container.joined .join-form-wrap {
  display: none;
}
.event-container.joined .joined-state {
  display: block;
}

.field-title {
  font-weight: 500;
}

.form-success-icon {
  font-size: 64px;
  color: #198754;
}

.other-events {
  flex: none;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.other-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 6px 8px 6px 16px;
  border-radius: 15px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #ffffff;
}
.other-events-header h2 {
  font-size: 18px;
  margin: 0;
}

.other-events-empty {
  padding: 12px;
  border-radius: 15px;
  background-color: #ffffff;
  color: #373737;
  text-align: center;
}

#other-events-carousel {
  padding: 0 40px;
}
#other-events-carousel .slick-track {
  display: flex;
}
#other-events-carousel .slick-slide {
  height: auto;
}
#other-events-carousel .slick-slide > div {
  height: 100%;
}
#other-events-carousel .slick-prev, #other-events-carousel .slick-next {
  z-index: 2;
  width: 36px;
  height: 36px;
}
#other-events-carousel .slick-prev:before, #other-events-carousel .slick-next:before {
  font-size: 36px;
  color: #373737;
}
#other-events-carousel .slick-prev {
  left: 0;
}
#other-events-carousel .slick-next {
  right: 0;
}

.other-event-slide {
  height: 100%;
  padding: 8px;
}

.other-event-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 10px;
  border-radius: 15px;
  background-color: #ffffff;
  color: #373737;
  text-decoration: none;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}
.other-event-card:hover {
  color: #373737;
  transform: translateY(-2px);
}

.other-event-photo {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.other-event-body {
  min-width: 0;
  font-size: 14px;
}

.other-event-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
}

@media (max-height: 800px) {
  .event-page-photo {
    width: 120px;
    height: 120px;
  }
  .event-page-header h1 {
    font-size: 22px;
  }
}
@media (max-width: 992px) {
  #event-page {
    height: auto;
    min-height: 100vh;
  }
  .event-page-main {
    flex-direction: column;
  }
  .event-join-panel {
    flex: none;
    overflow-y: visible;
  }
}
@media (max-width: 576px) {
  #event-page {
    gap: 12px;
    padding: 87px 12px 12px;
  }
  .event-page-card, .event-join-panel {
    padding: 14px;
  }
  .other-event-photo {
    width: 90px;
    height: 90px;
  }
  .event-page-header {
    gap: 12px;
  }
  .event-page-header h1 {
    font-size: 20px;
  }
  .event-page-info {
    font-size: 14px;
  }
  .event-page-photo {
    width: 80px;
    height: 80px;
    border-radius: 10px;
  }
  #other-events-carousel {
    padding: 0;
  }
}
