/* Event type colors */
.event-type-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
  margin-right: 5px;
}

.event-type-KRT {
  background-color: var(--primary-color); /* Yellow */
}

.event-type-Other {
  background-color: #888; /* Grey */
}

.event-type-Area {
  background-color: #3498db; /* Blue */
}

.event-type-National {
  background-color: #e74c3c; /* Red */
}

.event-type-Business {
  background-color: #2ecc71; /* Green */
}

.event-type-Fireworks {
  background-color: #9b59b6; /* Purple */
}

.event-type-Santa {
  background-color: #c0392b; /* Dark Red */
}

.event-type-SCP {
  background-color: #1abc9c; /* Teal */
}

.event-details h3 {
    font-size: 1.6em;
}

/* Upcoming Events Slider */
.upcoming-events-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}

.upcoming-events-nav-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  margin: 0 10px;
}

.upcoming-events-nav-btn:hover {
  transform: scale(1.1);
}

.upcoming-events-slider {
  position: relative;
  flex: 1;
  overflow: hidden; /* Hide overflow so only visible cards show */
}

/* Container should be wide enough to hold 5 cards in total */
.upcoming-events-container {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  will-change: transform;
}

/* Event card containers */
.event-card-container {
  box-sizing: border-box;
  padding: 0 10px;
}

/* Mobile (1 card visible) */
.event-card-container {
  flex: 0 0 calc(100% / 1); /* 3 total positions (1 visible + 2 hidden) */
  max-width: calc(100% / 1);
}

/* Tablet (2 cards visible) */
@media (min-width: 768px) {
  .event-card-container {
    flex: 0 0 calc(100% / 2); /* 4 total positions (2 visible + 2 hidden) */
    max-width: calc(100% / 2);
  }
}

/* Small desktop (3 cards visible) */
@media (min-width: 1024px) {
  .event-card-container {
    flex: 0 0 calc(100% / 3); /* 5 total positions (3 visible + 2 hidden) */
    max-width: calc(100% / 3);
  }
}

/* Large desktop (4 cards visible) */
@media (min-width: 1200px) {
  .event-card-container {
    flex: 0 0 calc(100% / 4); /* 6 total positions (4 visible + 2 hidden) */
    max-width: calc(100% / 4);
  }
}

/* Ensure all event cards have the same height */
.event-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 250px;
}

.event-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-footer {
  margin-top: auto;
}

/* Calendar Styles */
.calendar-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.calendar-header {
  background-color: var(--primary-color);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.calendar-month-year {
  font-size: 1.5rem;
  font-weight: bold;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.calendar-nav button {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
}

.calendar-nav button:hover {
  background: rgba(255, 255, 255, 0.5);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  background-color: #f5f5f5;
  font-weight: bold;
  padding: 10px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(80px, auto);
  gap: 1px;
  background-color: #eee;
}

.calendar-day {
  background-color: white;
  padding: 5px;
  min-height: 80px;
  position: relative;
  width: 100%; /* Fixed width for each day cell */
  box-sizing: border-box;
  overflow: hidden; /* Prevent content from expanding the cell */
}

.calendar-day.inactive {
  background-color: #f9f9f9;
  color: #aaa;
}

.calendar-day.today {
  background-color: #fffde7;
}

.calendar-day-number {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 24px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.today .calendar-day-number {
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
}

.calendar-event {
  margin-top: 25px;
  margin-bottom: 3px;
  padding: 3px 5px;
  border-radius: 3px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  color: white;
  transition: transform 0.2s ease;
  overflow: hidden; /* Ensure events are contained within the day cell */
  text-overflow: ellipsis; /* Show ellipsis for overflow text */
}

.calendar-event:hover {
  transform: translateY(-2px);
}

/* Event Modal */
.event-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.event-modal-content {
  background-color: white;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  overflow: hidden;
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-modal-header {
  padding: 20px;
  position: relative;
  color: white;
}

.event-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: white;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.event-modal-body {
  padding: 20px;
}

.event-modal-footer {
  padding: 15px 20px;
  text-align: right;
  background-color: #f5f5f5;
}

/* Calendar view toggle */
.calendar-view-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.calendar-view-toggle button {
  background: none;
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  font-weight: bold;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.calendar-view-toggle button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* List view */
.list-view {
  display: none;
}

.list-view.active {
  display: block;
}

.events-by-month {
  margin-bottom: 30px;
}

.month-header {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 15px;
  border-radius: 5px 5px 0 0;
  font-weight: bold;
  font-size: 1.2rem;
}

.events-list {
  background-color: white;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.list-event-item {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
}

.list-event-item:hover {
  background-color: #f9f9f9;
  cursor: pointer;
}

.list-event-date {
  min-width: 60px;
  text-align: center;
  margin-right: 15px;
}

.list-event-day {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
}

.list-event-details {
  flex: 1;
}

.list-event-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.list-event-info {
  color: #666;
  font-size: 0.9rem;
}

.list-event-time,
.list-event-location {
  display: inline-block;
  margin-right: 15px;
}

.calendar-view {
  display: block;
}

.calendar-view.inactive {
  display: none;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin: 30px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-container {
  text-align: center;
}
