* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

header {
  display: none;
}

.content {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  padding: 200px 300px;
  background: #ffffff;
  overflow: hidden;
  align-items: stretch;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 50px;
  overflow: visible;
}

.today-section {
  flex: 0 0 auto;
  border: none;
  border-radius: 16px;
  padding: 15px;
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.today-section h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.today-content {
  font-size: 12px;
  line-height: 1.6;
}

.today-date {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  position: relative;
}

.today-nav-btn {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 10px;
  font-size: 11px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.today-nav-btn:hover {
  background-color: #555;
}

.today-date-label {
  color: #888;
  font-weight: 500;
  margin-bottom: 4px;
}

.today-date-value {
  color: #333;
  font-weight: 600;
  font-size: 20px;
}

.today-events {
  margin-top: 10px;
}

.today-event-label {
  color: #888;
  font-weight: 500;
  margin-bottom: 4px;
}

.today-event-item {
  padding: 6px;
  margin-bottom: 4px;
  background: #fff;
  border-left: 3px solid #333;
  border-radius: 2px;
  color: #333;
  font-size: 11px;
}

.today-event-item.event-fast {
  border-left-color: #f44336;
  background: #ffebee;
}

.today-event-item.event-feast {
  border-left-color: #4caf50;
  background: #f1f8e9;
}

.today-event-item.event-easter {
  border-left-color: #ff9800;
  background: #fff3e0;
}

.events-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: white;
  padding: 16px;
  overflow: auto;
  position: relative;
}

.events-list::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 70%);
  pointer-events: none;
}

.events-list h2 {
  display: none;
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  flex: 0 0 auto;
}

.events-list .search-input {
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}

#calendar {
  max-width: 100%;
  background: #ffffff;
  overflow: visible;
  flex: none;
}

.calendar-container {
  background: white;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: 100%;
}

/* Calendar Card Styling - Modern Design */
.fc {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  background: transparent;
  width: 100%;
}

.fc .fc-view {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

.fc .fc-daygrid {
  border: none;
}

.fc .fc-col-header-cell {
  background-color: transparent;
  border-color: transparent;
  color: #666;
  font-weight: 600;
  font-size: 0.75em;
  padding: 12px 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fc .fc-daygrid-day {
  background-color: transparent;
  border-color: transparent;
  min-height: 60px;
  position: relative;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 4px;
}

.fc .fc-daygrid-day:hover {
  background-color: #f5f5f5;
}

.fc .fc-daygrid-day-number {
  font-weight: 600;
  color: #333;
  font-size: 1.1em;
  padding: 4px;
}

/* Today - Black Outline */
.fc .fc-daygrid-day.fc-day-today {
  background-color: transparent;
  border: 2px solid #000;
  border-radius: 8px;
  color: #333;
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  color: #333;
  font-weight: 700;
}

/* Other month dates - lighter gray */
.fc .fc-daygrid-day.fc-day-other {
  background-color: transparent;
}

.fc .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
  color: #ccc;
}

.fc .fc-col-header {
  margin-bottom: 8px;
}

.fc .fc-event {
  border: none;
  border-radius: 2px;
  opacity: 1;
  margin: 2px 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8em;
}

.fc .fc-event:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.fc .fc-event.selected {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
  filter: brightness(0.85);
}

.fc .fc-event-title {
  font-weight: 500;
  font-size: 0.8em;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.fc .fc-daygrid-day-frame {
  position: relative;
  border-radius: inherit;
}

.fc a {
  color: inherit;
  text-decoration: none;
}

/* Custom Header Styling */
.fc-custom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px 20px;
  background: transparent;
  margin-bottom: 8px;
}

.fc-custom-header-left {
  display: flex;
  align-items: center;
}

.year-selector-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.year-selector-inline label {
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.year-selector-inline select {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.year-selector-inline select:hover {
  border-color: #999;
}

.year-selector-inline select:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.fc-custom-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 1;
  margin: 0 20px;
}

.nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #ddd;
  color: #333;
  font-size: 18px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.nav-btn:hover {
  border-color: #999;
  background: #f5f5f5;
}

.nav-btn:active {
  background: #e8e8e8;
}

.fc-custom-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
}

/* Old calendar-grid styling - no longer needed with FullCalendar */
.calendar-grid {
  display: none;
}

.month {
  display: none;
}

.month-header {
  background: #f8f8f8;
  color: #1a1a1a;
  padding: 12px;
  text-align: center;
  font-size: 1.05em;
  font-weight: 600;
  border-bottom: 1px solid #e0e0e0;
  letter-spacing: -0.3px;
}

.days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #fafafa;
  text-align: center;
  font-weight: 600;
  color: #555;
  font-size: 0.85em;
  border-bottom: 1px solid #e0e0e0;
}

.days-header div {
  padding: 8px 0;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  background: #ffffff;
}

.day {
  aspect-ratio: unset;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 40px;
  position: relative;
  overflow: visible;
}

.day:hover {
  background: #fafafa;
  box-shadow: inset 0 0 0 1px #ddd;
}

.day-number {
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.day-empty {
  background: #fafafa;
  cursor: default;
  border-color: #f0f0f0;
}

.day-empty:hover {
  background: #fafafa;
  transform: none;
  box-shadow: none;
}

/* Pill-style event display */
.pills-container {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px;
  pointer-events: none;
  padding-left: 1px;
  padding-right: 1px;
}

.event-pill {
  position: absolute;
  height: 18px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 500;
  z-index: 5;
}

/* Single day - small circle */
.event-pill.pill-single {
  border-radius: 50%;
  width: 18px !important;
  height: 18px;
  padding: 0;
  justify-content: center;
  font-size: 0;
}

.event-pill.pill-single .pill-label {
  display: none;
}

.event-pill.pill-single:hover {
  transform: none;
}

/* Start of range - left rounded pill, right square */
.event-pill.pill-start {
  border-radius: 9px 0 0 9px;
}

/* Middle of range - both sides square */
.event-pill.pill-middle {
  border-radius: 0;
}

/* End of range - left square, right rounded pill */
.event-pill.pill-end {
  border-radius: 0 9px 9px 0;
}

.event-pill.selected {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
  filter: brightness(0.85);
}

.event-pill:hover {
  transform: scaleY(1.15);
  z-index: 6;
}

.pill-fast {
  background: #f44336;
  color: #fff;
  box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.pill-fast:hover {
  background: #d32f2f;
  box-shadow: 0 4px 8px rgba(244, 67, 54, 0.4);
  transform: scaleY(1.15);
}

.pill-feast {
  background: #4caf50;
  color: #fff;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.pill-feast:hover {
  background: #388e3c;
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
  transform: scaleY(1.15);
}

.pill-label {
  display: block;
  width: 100%;
}

.day.selected {
  box-shadow: inset 0 0 0 2px #333, 0 0 0 3px #333;
  background: #e0e0e0;
  z-index: 4;
}

.event-labels {
  display: none;
}

.event-label:hover {
  background: rgba(255, 255, 255, 1);
}

.day-event .event-label {
  color: #2e7d32;
}

.day-fast .event-label {
  color: #c62828;
}

.events-list {
  flex: 1;
  min-height: 0;
  background: #ffffff;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.events-list h2 {
  display: none;
  color: #1a1a1a;
  margin: 0 0 10px 0;
  padding: 15px 15px 0 15px;
  font-size: 1.1em;
  font-weight: 600;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
  letter-spacing: -0.3px;
  flex: 0 0 auto;
}

.search-input {
  width: calc(100% - 30px);
  padding: 10px;
  margin: 0 15px 15px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.search-input:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

.events-list ul {
  list-style: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 15px 15px;
  margin: 0;
}

.events-list ul::-webkit-scrollbar {
  width: 6px;
}

.events-list ul::-webkit-scrollbar-track {
  background: transparent;
}

.events-list ul::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.events-list ul::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

.events-list li {
  padding: 10px;
  margin-bottom: 6px;
  background: #f8f8f8;
  border-left: 3px solid #4caf50;
  border-radius: 1px;
  font-size: 0.9em;
  color: #333;
  transition: all 0.15s ease;
  cursor: pointer;
}

.events-list li:hover {
  background: #f0f0f0;
  border-left-color: #388e3c;
}

.events-list li.fast {
  border-left-color: #f44336;
}

.events-list li.fast:hover {
  border-left-color: #d32f2f;
}

.events-list li.selected {
  background: #333;
  color: #ffffff;
  border-left-color: #333;
}

.events-list li.selected strong,
.events-list li.selected .event-date {
  color: #ffffff;
}

.event-date {
  font-size: 0.8em;
  color: #888;
  margin-top: 4px;
}

.no-results {
  text-align: center;
  color: #999;
  padding: 20px 10px;
  font-size: 14px;
}

.event-item {
  padding: 10px;
  margin-bottom: 6px;
  background: #f8f8f8;
  border-left: 3px solid #4caf50;
  border-radius: 1px;
  font-size: 0.9em;
  color: #333;
  transition: all 0.15s ease;
  cursor: pointer;
}

.event-item:hover {
  background: #f0f0f0;
}

.event-item.event-fast {
  border-left-color: #f44336;
}

.event-item.event-fast:hover {
  border-left-color: #d32f2f;
  background: #fff3f0;
}

.event-item.event-feast {
  border-left-color: #4caf50;
}

.event-item.event-feast:hover {
  border-left-color: #388e3c;
  background: #f1f8f4;
}

.event-item.selected {
  background: #333;
  color: #ffffff;
  border-left-color: #333;
}

.event-item.selected .event-name,
.event-item.selected .event-date {
  color: #ffffff;
}

.event-name {
  font-weight: 600;
  color: #1a1a1a;
}
  margin-top: 3px;
  font-weight: 500;
}

.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 1em;
}

@media (max-width: 1024px) {
  .content {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 768px) {
  .content {
    flex-direction: column;
    gap: 0;
  }
  
  .events-list {
    border-left: none;
    border-top: 1px solid #e0e0e0;
    width: 100%;
    max-height: 300px;
  }
  
  #calendar {
    flex: 1;
  }

  .year-selector {
    flex-direction: column;
    align-items: flex-start;
  }
  
  header {
    padding: 20px;
  }
}
