.acf-gig-calendar-container {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 20px 25px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

/* === View Toggle Buttons === */
.view-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.view-toggle button {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #ddd;
  background: #f8f8f8;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.25s ease;
}

.view-toggle button:hover {
  background: #f0f0f0;
}

.view-toggle button.active {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* === Calendar Header === */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-header h3 {
  font-size: 1.3rem;
  margin: 0;
  font-weight: 600;
  color: #333;
}

.calendar-header a.nav {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.calendar-header a.nav:hover {
  color: #004f75;
  text-decoration: underline;
}

/* === Calendar Table === */
.acf-gig-calendar {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.acf-gig-calendar th {
  background: #f3f3f3;
  padding: 10px;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

.acf-gig-calendar td {
  width: 14.28%;
  min-height: 90px;
  vertical-align: top;
  border: 1px solid #eee;
  padding: 5px;
  position: relative;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.acf-gig-calendar td.empty-day {
  background: #fafafa;
}

.acf-gig-calendar td.today {
  background: #eaf6ff;
  border-color: #b5e1ff;
}

.acf-gig-calendar td.has-gigs:hover {
  background-color: #eef8ff;
  transform: scale(1.02);
  cursor: pointer;
}

.acf-gig-calendar .date-num {
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 3px;
}

/* === Gig Entries === */
.gig-entries {
  text-align: left;
  margin-top: 4px;
}

.gig-entry a {
  display: block;
  color: #0073aa;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}

.gig-entry a:hover {
  text-decoration: underline;
}

.gig-time,
.gig-venue {
  display: block;
  color: #777;
  font-size: 0.75rem;
}

/* === List View === */
.gig-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gig-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s ease;
  text-align: left; /* ADDED */
}

.gig-list li:hover {
  background-color: #f8fcff;
}

.gig-list li strong {
  color: #333;
}

.gig-list li a {
  color: #0073aa;
  font-weight: 500;
  text-decoration: none;
}

.gig-list li a:hover {
  text-decoration: underline;
}

.gig-list li em {
  color: #555;
  font-size: 0.85rem;
}

/* === Year View === */
#year-view h4 {
  text-align: left;
  margin-top: 20px;
  font-weight: 600;
  color: #333;
}

/* Ensure year view post info is left-aligned */
#year-view li {
  text-align: left; /* ADDED */
}

/* === Overlay Spinner === */
.loading-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(3px);
  z-index: 20;
}

.loading-spinner::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border: 3px solid #ccc;
  border-top-color: #0073aa;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 1s linear infinite;
}

/* === Animations === */
@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === Responsive === */
@media (max-width: 640px) {
  .acf-gig-calendar-container {
    padding: 10px;
    margin: 20px 10px;
    border-radius: 12px;
  }
  .calendar-header {
    flex-direction: column;
    gap: 5px;
  }
  .calendar-header h3 {
    font-size: 1.1rem;
  }
  .view-toggle {
    flex-direction: column;
  }
  .view-toggle button {
    width: 100%;
  }
  .acf-gig-calendar {
    table-layout: fixed;
  }
  .acf-gig-calendar th,
  .acf-gig-calendar td {
    padding: 3px 2px;
    font-size: 0.75rem;
  }
  .acf-gig-calendar td {
    min-height: 60px;
  }
  .acf-gig-calendar .date-num {
    font-size: 0.8rem;
  }
  .gig-entry a {
    font-size: 0.7rem;
  }
  .gig-time,
  .gig-venue {
    font-size: 0.65rem;
  }
}

/* === Week view shortcode === */
.acf-week-events .week-day-events h4 {
    color: #333;
    font-size: 18px !important;
    font-weight: 700;
    background-color: #F1F1F1;
    padding: 15px 0px 15px 0px;
    text-align: center;
    border: 1px solid darkgrey;
}
.week-event-list {
    padding-left: 24px;
}
