/* Main Layout */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #D1CAB6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* FullCalendar CSS Variables */
:root {
  --fc-list-event-hover-bg-color: #000000;
}

/* Fix list view hover text color */
.fc-list-event:hover td {
  color: #ffffff !important;
}

.fc-list-event:hover a {
  color: #ffffff !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.header {
  background: #D1CAB6;
  color: #000000;
  padding: 1rem 0 2rem;
  text-align: center;
  position: relative;
}

.header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

.header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.header-text h1 {
  margin: 0.5rem 0 0 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Return Button */
.return-button {
  position: absolute;
  top: 0.1rem;
  left: 0;
}

.return-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #000000;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  border: 1px solid transparent;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.return-link:hover {
  border-color: #000000;
  text-decoration: none;
}

.return-icon {
  font-size: 1.1rem;
  font-weight: 600;
}

.return-text {
  white-space: nowrap;
}

/* Language Switcher */
.language-switcher {
  position: absolute;
  top: 0.6rem;
  right: 0;
}

.lang-btn {
  color: #000000;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
}

.lang-btn::after {
  content: "";
  position: absolute;
  bottom: -0.1em;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  opacity: 0;
  transition: opacity 200ms ease;
}

.lang-btn:hover::after {
  opacity: 1;
}

.lang-btn:hover {
  text-decoration: none;
}

.calendar-container {
  padding: 1rem;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-bottom: 1px solid #D1CAB6;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.calendar-header-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: 1rem;
}

.calendar-header-intro p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  text-transform: none;
  letter-spacing: 0.02em;
}

#headerText_3 .link {
  font-weight: 600;
  color: #000000;
  text-decoration: underline;
}

#headerText_3 .link:hover {
  text-decoration: none;
}

.error {
  background: #fee;
  color: #c33;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Legend */
.legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-color.status-active {
  background-color: #28a746;
}

.legend-color.status-full {
  background-color: #dc3544;
}

.legend-color.status-few {
  background-color: #ffc105;
}

/* FullCalendar custom styling */
.fc-event {
  cursor: pointer;
  border: none !important;
  padding: 2px 4px;
  transition: all 0.2s ease;
}

.fc-event-title {
  font-weight: 500;
}

.fc-event-time {
  font-weight: 600;
}

.event-active {
  background-color: #6B8E6B !important;
  color: white !important;
}

.event-active:hover {
  background-color: #6B8E6B !important;
  color: white !important;
}

.event-full {
  background-color: #C17A5A !important;
  color: white !important;
}

.event-few {
  background-color: #D4A76B !important;
  color: #4A4A4A !important;
}

.fc-toolbar h2 {
  color: #000000;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin: 0;
}

.fc-toolbar {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 1rem !important;
  transition: all 0.3s ease;
}

.fc-toolbar-chunk {
  display: flex;
  align-items: center;
}

.fc-toolbar-chunk:first-child {
  justify-content: flex-start;
}

.fc-toolbar-chunk:nth-child(2) {
  justify-content: center;
}

.fc-toolbar-chunk:last-child {
  justify-content: flex-end;
}

.fc-button-group {
  font-size: 0.8rem;
}

.fc-button-primary {
  background-color: #000000 !important;
  border-color: #000000 !important;
  border-radius: 0 !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.fc-button-primary:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
}

/* TimeGrid View Enhancements */
.fc-timegrid-slot-label {
  font-size: 0.85rem;
  color: #666;
}

.fc-timegrid-axis {
  width: 60px;
}

.fc-timegrid-event {
  border-radius: 4px;
  margin: 1px;
}

.fc-timegrid-event .fc-event-time {
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.fc-timegrid-event .fc-event-title {
  font-size: 0.85rem;
  line-height: 1.2;
}

/* Now indicator styling */
.fc-timegrid-now-indicator-line {
  border-color: #e74c3c;
  border-width: 2px;
}

.fc-timegrid-now-indicator-arrow {
  border-color: #e74c3c;
}

/* Business hours styling */
.fc-non-business {
  background-color: #f8f9fa;
}

/* Hide week numbers */
.fc-daygrid-week-number {
  display: none !important;
}

/* Current day styling */
.fc-day-today {
  background-color: #F7EDDC !important;
}

.fc-day-today .fc-daygrid-day-number {
  background-color: #000000 !important;
  color: white !important;
  border-radius: 50% !important;
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
  .fc-day-today .fc-daygrid-day-number {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.75rem !important;
  }

  /* Improve touch targets for events */
  .fc-event {
    min-height: 24px !important;
    cursor: pointer !important;
  }

  /* Better spacing for mobile */
  .fc-daygrid-day-frame {
    padding: 2px !important;
  }

  .fc-daygrid-day-events {
    margin-top: 2px !important;
  }
}

/* Monthly view day padding */
.fc-daygrid-day-top {
  padding: 8px !important;
}

.fc-daygrid-day-frame {
  padding: 4px !important;
}

.fc-daygrid-day-events {
  margin-top: 4px !important;
}

.fc-daygrid-day-number {
  padding: 4px !important;
  margin: 4px !important;
}