.view-toggle-group {
  display: flex;
  border: 2px solid var(--theme-blue);
  border-radius: 25px;
  overflow: hidden;
}

.view-toggle-btn {
  background-color: #DDDDDD;
  color: #5F5F5F;
  border: none;
  padding: 8px 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  /* border-right: 2px solid var(--theme-blue); */
}

.view-toggle-btn:last-child {
  border-right: none;
}

.view-toggle-btn:hover {
  background-color: #f0f7ff;
}

.view-toggle-btn.active {
  background-color: var(--theme-blue);
  color: white;
}

.calendar-container {
  background-color: white;
  max-width: 100%;
  overflow: hidden;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-header h3 {
  color: var(--theme-dark-blue);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
}

.btn-nav {
  background-color: transparent;
  color: var(--theme-dark-blue);
  border: none;
  padding: 10px 15px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.btn-nav:hover {
  color: var(--theme-dark-blue);
}

.btn-nav .nav-arrow {
  font-size: 1.5rem;
  font-weight: bold;
}

.btn-nav .nav-month {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .btn-nav .nav-month {
    display: none;
  }
  
  .btn-nav {
    padding: 8px;
  }
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  max-width: 100%;
  overflow: hidden;
}

.calendar-day-header {
  text-align: center;
  font-weight: 600;
  color: white;
  background: var(--theme-dark-blue);
  padding: 3px;
  font-size: 1rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  color: #5F5F5F;
  font-weight: 500;
  background: #DBDBDB;
  min-width: 0;
  overflow: visible;
}

.day-number {
  text-align: right;
  width: 100%;
  font-weight: 600;
}

.events-container {
  width: 100%;
  margin-top: 8px;
  text-align: left;
  overflow: hidden;
}

.calendar-day:hover {
  background-color: #f8f9fa;
  border-color: var(--theme-blue);
  z-index: 100;
}

.calendar-day.other-month {
  color: #ccc;
  background: #F5F5F5;
}

.calendar-day.has-event {
  background: #DBDBDB;
  border-color: #e9ecef;
  font-weight: 500;
}

.event-preview {
  display: block;
  font-size: 0.75rem;
  color: var(--theme-blue);
  line-height: 1.3;
  font-weight: 600;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-preview:hover {
  text-decoration: none;
}

/* Event hover tooltip */
.event-preview-wrapper {
  position: relative;
  display: block;
  margin-bottom: 4px;
}

.event-preview {
  position: relative;
}

.event-tooltip {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  background: white;
  border: 2px solid var(--theme-blue);
  border-radius: 8px;
  padding: 12px 15px;
  min-width: 280px;
  max-width: 350px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  white-space: normal;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.event-preview:hover + .event-tooltip {
  visibility: visible;
  opacity: 1;
}

.event-tooltip-title {
  color: var(--theme-dark-blue);
  font-size: 0.938rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.event-tooltip-datetime {
  color: #666;
  font-size: 0.813rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-tooltip-datetime::before {
  content: '📅';
  font-size: 1rem;
}

.event-summary {
  display: flex;
  gap: 20px;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.event-date-badge {
  background-color: var(--theme-blue);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  min-width: 70px;
  height: fit-content;
}

.event-date-badge .month {
  display: block;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.event-date-badge .day {
  display: block;
  color: var(--theme-yellow);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.event-info h4 {
  color: var(--theme-dark-blue);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.event-info .time,
.event-info .location {
  color: #666;
  font-size: 0.875rem;
  margin-bottom: 5px;
}

.legend {
  background-color: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
}

.legend h4 {
  color: var(--theme-dark-blue);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.legend-dot.webinar {
  background-color: #2196F3;
}

.legend-dot.workshop {
  background-color: #4CAF50;
}

.legend-dot.meeting {
  background-color: #FF9800;
}

.legend-dot.conference {
  background-color: #9C27B0;
}

/* All-in-One Event Calendar Plugin Overrides */
.ai1ec-calendar-wrapper {
  margin-top: 2rem;
}

/* Calendar navigation styling */
.ai1ec-calendar-toolbar {
  background-color: transparent !important;
  border: none !important;
  padding: 1rem 0 !important;
}

.ai1ec-calendar-toolbar .ai1ec-btn-group {
  border: 2px solid var(--theme-blue) !important;
  border-radius: 25px !important;
  overflow: hidden !important;
}

.ai1ec-calendar-toolbar .ai1ec-btn {
  background-color: #DDDDDD !important;
  color: #5F5F5F !important;
  border: none !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.ai1ec-calendar-toolbar .ai1ec-btn:hover {
  background-color: #f0f7ff !important;
}

.ai1ec-calendar-toolbar .ai1ec-btn.ai1ec-active {
  background-color: var(--theme-blue) !important;
  color: white !important;
}

/* Calendar table styling */
.ai1ec-month-view .ai1ec-week {
  background-color: white !important;
}

.ai1ec-month-view th {
  background: var(--theme-dark-blue) !important;
  color: white !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  padding: 10px !important;
  border-radius: 4px !important;
}

.ai1ec-month-view td {
  border: 1px solid #e9ecef !important;
  background: #DBDBDB !important;
  color: #5F5F5F !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

.ai1ec-month-view td:hover {
  background-color: #f8f9fa !important;
  border-color: var(--theme-blue) !important;
}

.ai1ec-month-view td.ai1ec-today {
  background-color: #e3f2fd !important;
  border-color: var(--theme-blue) !important;
  font-weight: 600 !important;
}

.ai1ec-month-view td.ai1ec-has-events {
  background-color: #e3f2fd !important;
  border-color: var(--theme-blue) !important;
  font-weight: 600 !important;
}

.ai1ec-month-view .ai1ec-event {
  background-color: var(--theme-blue) !important;
  color: white !important;
  font-size: 0.75rem !important;
  padding: 2px 4px !important;
  margin: 2px 0 !important;
  border-radius: 3px !important;
}

.ai1ec-month-view .ai1ec-event:hover {
  background-color: var(--theme-dark-blue) !important;
  text-decoration: underline !important;
}

/* Calendar month/year navigation */
.ai1ec-pagination {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 1rem !important;
}

.ai1ec-pagination h3 {
  color: var(--theme-dark-blue) !important;
  font-size: 1.75rem !important;
  font-weight: 600 !important;
}

.ai1ec-pagination .ai1ec-btn {
  background-color: transparent !important;
  color: var(--theme-dark-blue) !important;
  border: none !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
}

.ai1ec-pagination .ai1ec-btn:hover {
  color: var(--theme-blue) !important;
}

/* Subscribe button styling */
.ai1ec-subscribe-dropdown {
  border: 2px solid var(--theme-blue) !important;
  border-radius: 25px !important;
}

.ai1ec-subscribe-dropdown .ai1ec-btn {
  background-color: var(--theme-blue) !important;
  color: white !important;
  border-radius: 25px !important;
  font-weight: 600 !important;
}

/* Event details popup */
.ai1ec-popup {
  border-radius: 10px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.ai1ec-popup .ai1ec-popup-title {
  background-color: var(--theme-blue) !important;
  color: white !important;
  border-radius: 10px 10px 0 0 !important;
}

.ai1ec-popup-excerpt a {
  color: var(--theme-blue) !important;
}

.ai1ec-popup-excerpt a:hover {
  color: var(--theme-dark-blue) !important;
}

/* Events List View */
.events-list-container {
  margin-bottom: 3rem;
}

.events-list {
  display: flex;
  flex-direction: column;
  /* gap: 1.5rem; */
}

.event-list-item {
  display: flex;
  gap: 1.5rem;
      margin-bottom: 25px;
    transition: transform 0.3s 
ease, box-shadow 0.3s 
ease;
  /* padding: 1.5rem; */
  /* background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease; */
}


.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--theme-dark-blue);
  border-radius: 10px;
  padding: 15px;
  min-width: 100px;
  text-align: center;
}

.event-date .month {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.event-date .day {
  color: var(--theme-yellow);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.event-details {
  flex: 1;
}

.event-details h3 {
  color: var(--theme-dark-blue);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 10px;
}


.archive-box {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  height: 100%;
}

.archive-box h3 {
  color: var(--theme-dark-blue);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.archive-box p {
  color: #666;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .calendar-container {
    padding: 15px 0;
  }

  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    padding: 3px;
    font-size: 0.75rem;
    min-height: 50px;
    overflow: hidden;
  }

  .day-number {
    font-size: 0.688rem;
  }

  .events-container {
    margin-top: 2px;
    overflow: hidden;
  }

  .event-preview {
    font-size: 0.563rem;
    line-height: 1.1;
    padding: 1px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .calendar-day-header {
    font-size: 0.625rem;
    padding: 5px 2px;
  }
  
  .event-tooltip {
    min-width: 200px;
    padding: 8px 12px;
    font-size: 0.688rem;
  }
  
  .event-tooltip-title {
    font-size: 0.75rem;
    margin-bottom: 3px;
  }
  
  .event-tooltip-datetime {
    font-size: 0.688rem;
  }
  
  .event-list-item {
    flex-direction: column;
    gap: 1rem;
  }
  
  .event-date {
    align-self: flex-start;
  }
  
  .view-toggle-btn {
    font-size: 0.875rem;
    padding: 6px 10px;
  }
}
