/**
 * Simple Calendar Frontend Styles
 * Font: Plus Jakarta Sans
 * Primary Color: #0F5C31 (Academic Events)
 * Secondary Color: #975F45 (Holidays)
 */

/* Import Plus Jakarta Sans Font */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties */
:root {
  --primary-color: #0F5C31;
  --secondary-color: #975F45;
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --bg-white: #ffffff;
  --bg-gray-50: #f9fafb;
  --bg-gray-100: #f3f4f6;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 8px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Calendar Container */
.simple-calendar-container {
  font-family: var(--font-family) !important;
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
  background: var(--bg-white) !important;
  border: 1px solid var(--border-color) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Targeted Elementor Override - Only for problematic elements */
.elementor .simple-calendar-container,
.elementor-widget .simple-calendar-container,
.elementor-element .simple-calendar-container {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Reset only for buttons and interactive elements in Elementor context */
.elementor .simple-calendar-container button,
.elementor .simple-calendar-container .nav-btn,
.elementor .simple-calendar-container .view-btn,
.elementor .simple-calendar-container .today-btn,
.elementor .simple-calendar-container .add-all-btn,
.elementor-widget .simple-calendar-container button,
.elementor-widget .simple-calendar-container .nav-btn,
.elementor-widget .simple-calendar-container .view-btn,
.elementor-widget .simple-calendar-container .today-btn,
.elementor-widget .simple-calendar-container .add-all-btn,
.elementor-element .simple-calendar-container button,
.elementor-element .simple-calendar-container .nav-btn,
.elementor-element .simple-calendar-container .view-btn,
.elementor-element .simple-calendar-container .today-btn,
.elementor-element .simple-calendar-container .add-all-btn {
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* Force borders for all calendar elements in Elementor - Ultra Aggressive */
.elementor .simple-calendar-container .calendar-grid,
.elementor .simple-calendar-container .calendar-day,
.elementor .simple-calendar-container .calendar-header-cell,
.elementor .simple-calendar-container .week-header,
.elementor .simple-calendar-container .week-grid,
.elementor .simple-calendar-container .day-column,
.elementor .simple-calendar-container .time-slot,
.elementor-widget .simple-calendar-container .calendar-grid,
.elementor-widget .simple-calendar-container .calendar-day,
.elementor-widget .simple-calendar-container .calendar-header-cell,
.elementor-widget .simple-calendar-container .week-header,
.elementor-widget .simple-calendar-container .week-grid,
.elementor-widget .simple-calendar-container .day-column,
.elementor-widget .simple-calendar-container .time-slot,
.elementor-element .simple-calendar-container .calendar-grid,
.elementor-element .simple-calendar-container .calendar-day,
.elementor-element .simple-calendar-container .calendar-header-cell,
.elementor-element .simple-calendar-container .week-header,
.elementor-element .simple-calendar-container .week-grid,
.elementor-element .simple-calendar-container .day-column,
.elementor-element .simple-calendar-container .time-slot,
body .elementor .simple-calendar-container .calendar-grid,
body .elementor .simple-calendar-container .calendar-day,
body .elementor .simple-calendar-container .calendar-header-cell,
html body .elementor .simple-calendar-container .calendar-grid,
html body .elementor .simple-calendar-container .calendar-day,
html body .elementor .simple-calendar-container .calendar-header-cell {
  border: 1px solid #e5e7eb !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
}

/* Force grid structure and borders with maximum specificity */
.elementor .simple-calendar-container .month-view .calendar-grid,
.elementor-widget .simple-calendar-container .month-view .calendar-grid,
.elementor-element .simple-calendar-container .month-view .calendar-grid,
body .elementor .simple-calendar-container .month-view .calendar-grid,
html body .elementor .simple-calendar-container .month-view .calendar-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 1px !important;
  background: #e5e7eb !important;
  border: 1px solid #e5e7eb !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Force individual calendar day borders */
.elementor .simple-calendar-container .calendar-day,
.elementor-widget .simple-calendar-container .calendar-day,
.elementor-element .simple-calendar-container .calendar-day,
body .elementor .simple-calendar-container .calendar-day,
html body .elementor .simple-calendar-container .calendar-day {
  background: #ffffff !important;
  min-height: 100px !important;
  padding: 0.5rem !important;
  position: relative !important;
  cursor: pointer !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #1f2937 !important;
  box-sizing: border-box !important;
}

/* Force header cell borders */
.elementor .simple-calendar-container .calendar-header-cell,
.elementor-widget .simple-calendar-container .calendar-header-cell,
.elementor-element .simple-calendar-container .calendar-header-cell,
body .elementor .simple-calendar-container .calendar-header-cell,
html body .elementor .simple-calendar-container .calendar-header-cell {
  background: #f3f4f6 !important;
  padding: 0.75rem 0.5rem !important;
  text-align: center !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  font-size: 0.875rem !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  box-sizing: border-box !important;
}

/* Force specific borders for grid elements */
.elementor .simple-calendar-container .calendar-header,
.elementor-widget .simple-calendar-container .calendar-header,
.elementor-element .simple-calendar-container .calendar-header {
  border-bottom: 1px solid var(--border-color) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

.elementor .simple-calendar-container .view-btn,
.elementor-widget .simple-calendar-container .view-btn,
.elementor-element .simple-calendar-container .view-btn {
  border-right: 1px solid var(--border-color) !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
}

.elementor .simple-calendar-container .view-btn:last-child,
.elementor-widget .simple-calendar-container .view-btn:last-child,
.elementor-element .simple-calendar-container .view-btn:last-child {
  border-right: none !important;
}

/* Calendar Header */
.simple-calendar-container .calendar-header {
  background: var(--bg-gray-50) !important;
  padding: 1rem !important;
  border-bottom: 1px solid var(--border-color) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  margin: 0 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

@media (min-width: 768px) {
  .simple-calendar-container .calendar-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
}

/* Calendar Navigation */
.simple-calendar-container .calendar-navigation {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Calendar Controls */
.simple-calendar-container .calendar-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 768px) {
  .simple-calendar-container .calendar-controls {
    justify-content: flex-end !important;
  }
}

/* Ultra-specific selectors to override Elementor */
.simple-calendar-container .nav-btn,
div.simple-calendar-container .nav-btn,
.elementor .simple-calendar-container .nav-btn,
.elementor-widget .simple-calendar-container .nav-btn,
.elementor-element .simple-calendar-container .nav-btn,
body .simple-calendar-container .nav-btn,
html body .simple-calendar-container .nav-btn {
  background: var(--bg-white) !important;
  border: 1px solid var(--border-color) !important;
  padding: 0.5rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  color: var(--text-color) !important;
  font-family: var(--font-family) !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.simple-calendar-container .nav-btn:hover,
div.simple-calendar-container .nav-btn:hover,
.elementor .simple-calendar-container .nav-btn:hover,
.elementor-widget .simple-calendar-container .nav-btn:hover,
.elementor-element .simple-calendar-container .nav-btn:hover,
body .simple-calendar-container .nav-btn:hover,
html body .simple-calendar-container .nav-btn:hover {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}

.simple-calendar-container .today-btn,
div.simple-calendar-container .today-btn,
.elementor .simple-calendar-container .today-btn,
.elementor-widget .simple-calendar-container .today-btn,
.elementor-element .simple-calendar-container .today-btn,
body .simple-calendar-container .today-btn,
html body .simple-calendar-container .today-btn {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.5rem 0.75rem !important;
  min-width: 60px !important;
  font-family: var(--font-family) !important;
  background: var(--bg-white) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-color) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.simple-calendar-container .add-all-btn,
div.simple-calendar-container .add-all-btn,
.elementor .simple-calendar-container .add-all-btn,
.elementor-widget .simple-calendar-container .add-all-btn,
.elementor-element .simple-calendar-container .add-all-btn,
body .simple-calendar-container .add-all-btn,
html body .simple-calendar-container .add-all-btn {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.5rem 0.75rem !important;
  gap: 0.5rem !important;
  background: var(--secondary-color) !important;
  border: 1px solid var(--secondary-color) !important;
  color: white !important;
  font-family: var(--font-family) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.simple-calendar-container .add-all-btn:hover,
div.simple-calendar-container .add-all-btn:hover,
.elementor .simple-calendar-container .add-all-btn:hover,
.elementor-widget .simple-calendar-container .add-all-btn:hover,
.elementor-element .simple-calendar-container .add-all-btn:hover,
body .simple-calendar-container .add-all-btn:hover,
html body .simple-calendar-container .add-all-btn:hover {
  background: #7d4f37 !important;
  border-color: #7d4f37 !important;
  color: white !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}

.simple-calendar-container .calendar-title,
.elementor .simple-calendar-container .calendar-title,
.elementor-widget .simple-calendar-container .calendar-title {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #0F5C31 !important;
  min-width: 200px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  font-family: var(--font-family) !important;
}

.simple-calendar-container .academic-year,
.elementor .simple-calendar-container .academic-year,
.elementor-widget .simple-calendar-container .academic-year {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #975F45 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  font-family: var(--font-family) !important;
}

/* View Switcher */
.simple-calendar-container .view-switcher {
  display: flex !important;
  background: var(--bg-white) !important;
  border: 1px solid var(--border-color) !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Ultra-specific selectors for view buttons to override Elementor */
.simple-calendar-container .view-btn,
div.simple-calendar-container .view-btn,
.elementor .simple-calendar-container .view-btn,
.elementor-widget .simple-calendar-container .view-btn,
.elementor-element .simple-calendar-container .view-btn,
body .simple-calendar-container .view-btn,
html body .simple-calendar-container .view-btn {
  background: transparent !important;
  border: none !important;
  padding: 0.5rem 1rem !important;
  cursor: pointer !important;
  font-family: var(--font-family) !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
  transition: all 0.2s ease !important;
  border-right: 1px solid var(--border-color) !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  outline: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.simple-calendar-container .view-btn:last-child,
div.simple-calendar-container .view-btn:last-child,
.elementor .simple-calendar-container .view-btn:last-child,
.elementor-widget .simple-calendar-container .view-btn:last-child,
.elementor-element .simple-calendar-container .view-btn:last-child,
body .simple-calendar-container .view-btn:last-child,
html body .simple-calendar-container .view-btn:last-child {
  border-right: none !important;
}

.simple-calendar-container .view-btn:hover,
.simple-calendar-container .view-btn.active,
div.simple-calendar-container .view-btn:hover,
div.simple-calendar-container .view-btn.active,
.elementor .simple-calendar-container .view-btn:hover,
.elementor .simple-calendar-container .view-btn.active,
.elementor-widget .simple-calendar-container .view-btn:hover,
.elementor-widget .simple-calendar-container .view-btn.active,
.elementor-element .simple-calendar-container .view-btn:hover,
.elementor-element .simple-calendar-container .view-btn.active,
body .simple-calendar-container .view-btn:hover,
body .simple-calendar-container .view-btn.active,
html body .simple-calendar-container .view-btn:hover,
html body .simple-calendar-container .view-btn.active {
  background: var(--primary-color) !important;
  color: white !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}

/* Calendar Content */
.calendar-content {
  position: relative;
  min-height: 400px;
}

.calendar-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-muted);
}

.loading-spinner,
.simple-calendar-container .loading-spinner,
.elementor .simple-calendar-container .loading-spinner,
.elementor-widget .simple-calendar-container .loading-spinner {
  width: 40px !important;
  height: 40px !important;
  border: 3px solid var(--border-color) !important;
  border-top: 3px solid var(--primary-color) !important;
  border-radius: 50% !important;
  animation: spin 1s linear infinite !important;
  margin: 0 auto 1rem !important;
  box-sizing: border-box !important;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Calendar Views */
.simple-calendar-container .calendar-view {
  padding: 0.5rem !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Month View */
.simple-calendar-container .month-view .calendar-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 1px !important;
  background: var(--border-color) !important;
  border: 1px solid var(--border-color) !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.simple-calendar-container .calendar-header-cell {
  background: var(--bg-gray-100) !important;
  padding: 0.75rem 0.5rem !important;
  text-align: center !important;
  font-weight: 600 !important;
  color: var(--text-color) !important;
  font-size: 0.875rem !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--font-family) !important;
}

.simple-calendar-container .calendar-day {
  background: var(--bg-white) !important;
  min-height: 100px !important;
  max-height: 100px !important;
  height: 100px !important;
  padding: 0.4rem !important;
  position: relative !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--font-family) !important;
  color: var(--text-color) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

.simple-calendar-container .calendar-day:hover {
  background: var(--bg-gray-50) !important;
}

.simple-calendar-container .calendar-day.other-month {
  background: var(--bg-gray-50) !important;
  color: var(--text-muted) !important;
}

.simple-calendar-container .calendar-day.today,
.elementor .simple-calendar-container .calendar-day.today,
.elementor-widget .simple-calendar-container .calendar-day.today {
  background: #F5F3EC !important;
  color: #1f2937 !important;
}

.simple-calendar-container .calendar-day.other-month-hidden {
  background: transparent !important;
  border: none !important;
  cursor: default !important;
}

.simple-calendar-container .day-number {
  font-weight: 600 !important;
  margin-bottom: 0.2rem !important;
  font-size: 0.875rem !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: inherit !important;
  font-family: var(--font-family) !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.simple-calendar-container .day-events {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  flex: 1 !important;
  overflow: visible !important;
  min-height: 0 !important;
  align-items: flex-start !important;
}

.simple-calendar-container .event-item,
.elementor .simple-calendar-container .event-item,
.elementor-widget .simple-calendar-container .event-item {
  background: var(--primary-color) !important;
  color: #ffffff !important;
  padding: 4px 6px !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: opacity 0.2s ease !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  font-family: var(--font-family) !important;
  text-decoration: none !important;
  outline: none !important;
  line-height: 1.2 !important;
  min-height: 20px !important;
  display: block !important;
}

.simple-calendar-container .event-item:hover,
.elementor .simple-calendar-container .event-item:hover,
.elementor-widget .simple-calendar-container .event-item:hover {
  opacity: 0.9 !important;
}

.simple-calendar-container .event-item.holiday,
.elementor .simple-calendar-container .event-item.holiday,
.elementor-widget .simple-calendar-container .event-item.holiday {
  background: var(--secondary-color) !important;
}

.simple-calendar-container .more-events-link,
.elementor .simple-calendar-container .more-events-link,
.elementor-widget .simple-calendar-container .more-events-link {
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  color: #975F45 !important;
  cursor: pointer !important;
  padding: 2px 4px !important;
  margin: 0 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  display: block !important;
  background: transparent !important;
  border: none !important;
  text-align: left !important;
  font-family: var(--font-family) !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
  height: auto !important;
  min-height: 14px !important;
}

.simple-calendar-container .more-events-link:hover,
.elementor .simple-calendar-container .more-events-link:hover,
.elementor-widget .simple-calendar-container .more-events-link:hover {
  color: #0F5C31 !important;
  text-decoration: underline !important;
  background: transparent !important;
}

/* Week View */
.simple-calendar-container .week-view .week-header {
  display: grid !important;
  grid-template-columns: 60px repeat(7, 1fr) !important;
  gap: 1px !important;
  background: var(--border-color) !important;
  border: 1px solid var(--border-color) !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.simple-calendar-container .week-view .week-header .time-column {
  background: var(--bg-gray-100) !important;
  padding: 0.75rem 0.5rem !important;
  text-align: center !important;
  font-weight: 600 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--font-family) !important;
  color: var(--text-color) !important;
}

.simple-calendar-container .week-view .week-header .day-header {
  background: var(--bg-gray-100) !important;
  padding: 0.75rem 0.5rem !important;
  text-align: center !important;
  font-weight: 600 !important;
  color: var(--text-color) !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--font-family) !important;
}

.simple-calendar-container .week-view .week-grid {
  display: grid !important;
  grid-template-columns: 60px repeat(7, 1fr) !important;
  gap: 1px !important;
  background: var(--border-color) !important;
  border: 1px solid var(--border-color) !important;
  border-top: none !important;
  overflow: hidden !important;
  max-height: 500px !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.time-slot {
  background: var(--bg-gray-50);
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.day-column {
  background: var(--bg-white);
  padding: 0.25rem;
  position: relative;
  min-height: 50px;
  border-bottom: 1px solid var(--border-color);
}

/* Mobile Week View */
.week-mobile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-day-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 1rem;
}

.mobile-day-header {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.mobile-day-events {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.no-events {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.mobile-event-item {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mobile-event-item:hover {
  opacity: 0.9;
}

.mobile-event-item.holiday {
  background: var(--secondary-color);
}

.mobile-event-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.mobile-event-time {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Day View */
.day-view .day-header {
  text-align: center;
  padding: 1rem;
  background: var(--bg-gray-50);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.day-view .day-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.day-view .day-events-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.day-event-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.day-event-card:hover {
  background: var(--bg-gray-50);
}

.day-event-card .event-time {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.day-event-card .event-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.day-event-card .event-description {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.day-event-card .event-location {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Calendar Legend */
.calendar-legend {
  padding: 1rem;
  background: var(--bg-gray-50);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-color);
}

.legend-color {
  width: 16px;
  height: 16px;
}

/* Event Modal */
.event-modal,
#simple-calendar-event-modal,
#calendar-provider-modal,
.elementor .event-modal,
.elementor-widget .event-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 999999 !important;
  display: none !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
}

.event-modal.active,
#simple-calendar-event-modal.active,
#calendar-provider-modal.active {
  display: block !important;
  opacity: 1 !important;
}

.modal-overlay,
.event-modal .modal-overlay,
.elementor .event-modal .modal-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.5) !important;
  cursor: pointer !important;
}

.modal-content,
.event-modal .modal-content,
.elementor .event-modal .modal-content,
.elementor-widget .event-modal .modal-content {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: #ffffff !important;
  border: 2px solid #0F5C31 !important;
  max-width: 500px !important;
  width: 90% !important;
  max-height: 80vh !important;
  overflow: hidden !important;
  box-shadow: 0 20px 25px -5px rgba(15, 92, 49, 0.2), 0 10px 10px -5px rgba(15, 92, 49, 0.1) !important;
  border-radius: 0 !important;
  z-index: 1000000 !important;
}

.modal-header,
.event-modal .modal-header,
.elementor .event-modal .modal-header {
  padding: 1.5rem !important;
  border-bottom: 2px solid #F5F3EC !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: #F5F3EC !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.modal-header h3,
.event-modal .modal-header h3,
.elementor .event-modal .modal-header h3,
.modal-header .event-title,
.event-modal .modal-header .event-title {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #0F5C31 !important;
  font-family: var(--font-family) !important;
  line-height: 1.5 !important;
  flex: 1 !important;
  padding-right: 1rem !important;
}

.modal-close,
.event-modal .modal-close,
.simple-calendar-container .modal-close,
.elementor .event-modal .modal-close,
.elementor-widget .event-modal .modal-close,
.elementor-element .event-modal .modal-close,
button.modal-close,
.event-modal button.modal-close {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  font-size: 1.75rem !important;
  cursor: pointer !important;
  color: #975F45 !important;
  padding: 0 !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  line-height: 1 !important;
  font-family: Arial, sans-serif !important;
  font-weight: bold !important;
  opacity: 1 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  flex-shrink: 0 !important;
}

.modal-close:hover,
.event-modal .modal-close:hover,
.simple-calendar-container .modal-close:hover,
.elementor .event-modal .modal-close:hover,
.elementor-widget .event-modal .modal-close:hover,
.elementor-element .event-modal .modal-close:hover,
button.modal-close:hover,
.event-modal button.modal-close:hover {
  background: #975F45 !important;
  background-color: #975F45 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-shadow: none !important;
  transform: scale(1.1) !important;
  filter: none !important;
}

.modal-body,
.event-modal .modal-body,
.elementor .event-modal .modal-body {
  padding: 1.5rem !important;
  background: #ffffff !important;
  color: #0F5C31 !important;
  font-family: var(--font-family) !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  max-height: calc(80vh - 80px) !important;
  overflow-y: auto !important;
}

.event-details,
.event-modal .event-details {
  margin-bottom: 1.5rem !important;
}

.event-details > div,
.event-modal .event-details > div {
  margin-bottom: 1rem !important;
  padding: 0.75rem !important;
  background: #F5F3EC !important;
  border-left: 3px solid #0F5C31 !important;
}

.event-details > div:last-child,
.event-modal .event-details > div:last-child {
  margin-bottom: 0 !important;
}

.event-details > div:empty,
.event-modal .event-details > div:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.day-event-item,
.event-modal .day-event-item {
  margin-bottom: 1rem !important;
  padding: 0.75rem !important;
  background: #F5F3EC !important;
  border-left: 3px solid #0F5C31 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.day-event-item:last-child {
  margin-bottom: 0 !important;
}

/* Academic event styling */
.day-event-item.academic {
  border-left-color: #0F5C31 !important;
}

.day-event-item.academic:hover {
  background: #0F5C31 !important;
  color: #ffffff !important;
  transform: translateX(5px) !important;
}

.day-event-item.academic strong {
  color: #0F5C31 !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

.day-event-item.academic span {
  color: #0F5C31 !important;
  font-size: 0.8125rem !important;
  line-height: 1.4 !important;
}

.day-event-item.academic:hover strong,
.day-event-item.academic:hover span {
  color: #ffffff !important;
}

/* Holiday event styling */
.day-event-item.holiday {
  border-left-color: #975F45 !important;
}

.day-event-item.holiday:hover {
  background: #975F45 !important;
  color: #ffffff !important;
  transform: translateX(5px) !important;
}

.day-event-item.holiday strong {
  color: #975F45 !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

.day-event-item.holiday span {
  color: #975F45 !important;
  font-size: 0.8125rem !important;
  line-height: 1.4 !important;
}

.day-event-item.holiday:hover strong,
.day-event-item.holiday:hover span {
  color: #ffffff !important;
}

.event-date,
.event-time,
.event-location,
.event-modal .event-date,
.event-modal .event-time,
.event-modal .event-location {
  font-size: 0.875rem !important;
  color: #0F5C31 !important;
  font-family: var(--font-family) !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
}

.event-description,
.event-modal .event-description {
  color: #0F5C31 !important;
  line-height: 1.6 !important;
  font-family: var(--font-family) !important;
  font-weight: 400 !important;
}

.add-to-calendar-btn,
.event-modal .add-to-calendar-btn,
.elementor .event-modal .add-to-calendar-btn {
  background: #0F5C31 !important;
  color: #ffffff !important;
  border: 2px solid #0F5C31 !important;
  padding: 0.875rem 1.5rem !important;
  font-family: var(--font-family) !important;
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  justify-content: center !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-shadow: none !important;
  text-decoration: none !important;
}

.add-to-calendar-btn:hover,
.event-modal .add-to-calendar-btn:hover,
.elementor .event-modal .add-to-calendar-btn:hover {
  background: #ffffff !important;
  color: #0F5C31 !important;
  border-color: #0F5C31 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 6px rgba(15, 92, 49, 0.2) !important;
}

/* Calendar Provider Modal */
.calendar-providers,
.event-modal .calendar-providers {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  margin-top: 1rem !important;
}

.event-modal .modal-body p {
  color: #0F5C31 !important;
  font-weight: 500 !important;
  margin-bottom: 1rem !important;
  font-family: var(--font-family) !important;
}

.provider-btn,
.event-modal .provider-btn,
.elementor .event-modal .provider-btn {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 1rem !important;
  border: 2px solid #F5F3EC !important;
  background: #F5F3EC !important;
  color: #0F5C31 !important;
  font-family: var(--font-family) !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-align: left !important;
  width: 100% !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
}

.provider-btn:hover,
.event-modal .provider-btn:hover,
.elementor .event-modal .provider-btn:hover,
.google-btn:hover,
.apple-btn:hover,
.outlook-btn:hover,
.download-btn:hover {
  background: #0F5C31 !important;
  border-color: #0F5C31 !important;
  color: #ffffff !important;
  transform: translateX(5px) !important;
  box-shadow: none !important;
}

.provider-btn svg,
.event-modal .provider-btn svg {
  flex-shrink: 0 !important;
  transition: transform 0.2s ease !important;
}

.provider-btn:hover svg {
  transform: scale(1.1) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .simple-calendar-container {
    margin: 0 0.25rem;
    border-radius: 0;
    box-shadow: none;
    width: auto;
    max-width: none;
  }
  
  .calendar-header {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .calendar-view {
    padding: 0.25rem;
  }
  
  .calendar-navigation {
    width: 100%;
    justify-content: space-between;
  }
  
  .calendar-title {
    font-size: 1.25rem;
    min-width: auto;
    text-align: center;
    flex: 1;
  }
  
  .view-switcher {
    width: 100%;
    justify-content: center;
  }
  
  .view-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    flex: 1;
    max-width: 120px;
  }
  
  /* Mobile Month View Improvements */
  .month-view .calendar-grid {
    gap: 1px;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  .calendar-day {
    min-height: 0;
    height: 0;
    padding-bottom: 100%;
    padding-top: 0.4rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    font-size: 0.875rem;
    min-width: 0;
    overflow: hidden;
    position: relative;
  }

  .day-number {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .event-item {
    display: none !important; /* Hide individual events on mobile */
  }

  .event-count {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: #0F5C31 !important;
    background: #F5F3EC !important;
    padding: 3px 5px !important;
    border-radius: 2px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    margin-top: 2px !important;
    border: 1px solid #0F5C31 !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    text-align: left !important;
    gap: 1px !important;
  }

  .event-count .count-number {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: block !important;
  }

  .event-count .count-label {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    display: block !important;
  }

  .event-count:hover {
    background: #0F5C31 !important;
    color: #ffffff !important;
  }

  .event-count.academic {
    border-color: #0F5C31 !important;
    color: #0F5C31 !important;
  }

  .event-count.academic:hover {
    background: #0F5C31 !important;
    color: #ffffff !important;
  }

  .event-count.holiday {
    border-color: #975F45 !important;
    color: #975F45 !important;
  }

  .event-count.holiday:hover {
    background: #975F45 !important;
    color: #ffffff !important;
  }

  .event-count.mixed {
    border-color: #6b7280 !important;
    color: #6b7280 !important;
  }

  .event-count.mixed:hover {
    background: #6b7280 !important;
    color: #ffffff !important;
  }

  .more-events-link {
    display: none !important; /* Hide +X more on mobile */
  }

  .calendar-header-cell {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
  }
  
  /* Mobile Week View - Stack Layout */
  .week-view .week-header {
    display: none; /* Hide complex header on mobile */
  }
  
  .week-view .week-grid {
    display: block;
    background: transparent;
    border: none;
    max-height: none;
    overflow-y: visible;
  }
  
  .week-view .day-column {
    display: block;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    padding: 1rem;
    min-height: auto;
  }
  
  .week-view .day-column::before {
    content: attr(data-day);
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .week-view .time-slot {
    display: none; /* Hide time slots on mobile */
  }
  
  /* Mobile Day View Improvements */
  .day-view .day-header {
    padding: 1.5rem 1rem;
  }
  
  .day-view .day-title {
    font-size: 1.5rem;
  }
  
  .day-event-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  /* Modal Improvements */
  .modal-content {
    width: 95%;
    max-width: 95%;
    max-height: 90vh;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  
  .modal-header,
  .modal-body {
    padding: 1.25rem;
  }
  
  .modal-header h3 {
    font-size: 1.125rem;
  }
  
  /* Legend on Mobile */
  .calendar-legend {
    padding: 1rem;
    gap: 0.75rem;
    justify-content: flex-start;
  }
  
  .legend-item {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .simple-calendar-container {
    margin: 0 0.125rem;
    border-radius: 0;
    box-shadow: none;
    width: auto;
    max-width: none;
  }
  
  .calendar-header {
    padding: 0.75rem;
  }
  
  .calendar-navigation {
    gap: 0.5rem;
  }
  
  .calendar-title {
    font-size: 1.125rem;
  }
  
  .nav-btn {
    padding: 0.5rem;
    min-width: 40px;
    height: 40px;
  }
  
  .today-btn {
    min-width: 50px;
    font-size: 0.75rem;
    padding: 0.5rem;
  }
  
  .add-all-btn {
    font-size: 0.75rem;
    padding: 0.5rem;
    gap: 0.25rem;
    min-width: auto;
    white-space: nowrap;
  }
  
  .add-all-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .view-btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  /* Ultra Mobile Month View */
  .month-view .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  .calendar-day {
    min-height: 0;
    height: 0;
    padding-bottom: 100%;
    padding-top: 0.3rem;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    min-width: 0;
    overflow: hidden;
    position: relative;
  }

  .day-number {
    font-size: 0.8125rem;
  }

  .event-item {
    display: none !important; /* Hide individual events on mobile */
  }

  .event-count {
    padding: 2px 4px !important;
    gap: 0px !important;
  }

  .event-count .count-number {
    font-size: 0.8rem !important;
  }

  .event-count .count-label {
    font-size: 0.65rem !important;
  }

  .more-events-link {
    display: none !important; /* Hide +X more on mobile */
  }

  .calendar-header-cell {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    min-width: 0;
    overflow: hidden;
  }
  
  /* Ultra Mobile Week View */
  .week-view .day-column {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .week-view .day-column::before {
    font-size: 0.9375rem;
    margin-bottom: 0.375rem;
    padding-bottom: 0.375rem;
  }
  
  /* Ultra Mobile Day View */
  .day-view .day-header {
    padding: 1rem 0.75rem;
  }
  
  .day-view .day-title {
    font-size: 1.25rem;
  }
  
  .day-event-card {
    padding: 1rem;
  }
  
  .modal-header,
  .modal-body {
    padding: 1rem;
  }
}

/* Print Styles */
@media print {
  .calendar-header {
    background: white !important;
    border-bottom: 1px solid #000;
  }
  
  .view-switcher,
  .calendar-navigation {
    display: none;
  }
  
  .event-modal {
    display: none !important;
  }
  
  .simple-calendar-container {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Instructions Modal Styles */
.instructions-modal-content {
  max-width: 600px !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  margin: auto !important;
}

.instructions-content {
  text-align: center;
}

.provider-icon {
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
}

.instructions-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  text-align: center;
}

.instruction-steps {
  text-align: left;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
  max-width: 500px;
  counter-reset: step-counter;
  list-style: none;
}

.instruction-steps li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  counter-increment: step-counter;
  font-size: 0.9375rem;
}

.instruction-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.instruction-steps li strong {
  color: var(--text-color);
  font-weight: 600;
}

.instruction-steps li a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.instruction-steps li a:hover {
  text-decoration: underline;
}

.download-button-container {
  margin-top: 1.5rem;
  text-align: center;
}

.download-calendar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--primary-color);
  color: white !important;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.download-calendar-btn:hover {
  background: #0d4a28;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 92, 49, 0.3);
  color: white !important;
  text-decoration: none !important;
}

.download-calendar-btn:visited {
  color: white !important;
}

.download-calendar-btn:active {
  transform: translateY(0);
}

.download-calendar-btn svg {
  width: 20px;
  height: 20px;
}

.success-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: #155724;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

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

.success-message svg {
  flex-shrink: 0;
}

/* Mobile responsiveness for instructions modal */
@media (max-width: 640px) {
  .instructions-modal-content {
    margin: 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
    max-height: 95vh !important;
  }

  .provider-icon {
    margin: 0 auto 0.75rem;
  }

  .provider-icon svg {
    width: 40px !important;
    height: 40px !important;
  }

  .instructions-content h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .instruction-steps {
    padding: 0 0.5rem;
    margin: 0 auto 1rem;
  }

  .instruction-steps li {
    padding-left: 2.25rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
  }

  .instruction-steps li::before {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    top: -1px;
  }

  .download-button-container {
    margin-top: 1rem;
  }

  .download-calendar-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }

  .download-calendar-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  .modal-header,
  .modal-body {
    padding: 0.875rem !important;
  }
}
