/* ======== CALENDAR STYLES ======== */
.calendar-container {
  max-width: 1400px;
  margin: 30px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: all 0.3s ease;
}

/* ======== LOADING & ERROR ======== */
.loading {
  text-align: center;
  padding: 40px;
  color: #667eea;
  font-size: 1.2em;
}

.error {
  text-align: center;
  padding: 20px;
  background: #e74c3c;
  color: #fff;
  border-radius: 10px;
  display: none;
}

/* ======== NAVIGATION ======== */
.calendar-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.nav-btn {
  background: #667eea;
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.2em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.nav-btn:hover {
  background: #5a6fd8;
  transform: scale(1.1);
}

.current-period {
  font-weight: 600;
  font-size: 1.2em;
  color: #2c3e50;
  min-width: 300px;
  text-align: center;
}

/* ======== MONTH SELECTOR ======== */
.month-selector {
  text-align: center;
  margin-bottom: 25px;
}

#month-select {
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1em;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

#month-select:focus {
  outline: none;
  border-color: #667eea;
}

/* ======== CALENDAR GRID ======== */
.calendar-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.month {
  background: #fafafa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e8e8e8;
  transition: transform 0.25s ease;
}

.month:hover {
  transform: translateY(-4px);
}

.month h2 {
  text-align: center;
  color: #34495e;
  font-size: 1.3em;
  margin-bottom: 20px;
  border-bottom: 2px solid #667eea;
  padding-bottom: 8px;
}

/* ======== DAY GRID ======== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.day-name {
  text-align: center;
  font-weight: 600;
  font-size: 0.85em;
  color: #2c3e50;
  text-transform: uppercase;
  background: #f1f3f5;
  border-radius: 6px;
  padding: 10px 0;
}

.day {
  height: 45px;
  border-radius: 8px;
  border: 2px solid #f0f0f0;
  background: #fff;
  text-align: center;
  line-height: 45px;
  font-weight: 600;
  font-size: 0.9em;
  position: relative;
  cursor: default;
  transition: all 0.2s ease;
}

.day.empty {
  border: none;
  background: transparent;
  cursor: default;
}

/* ======== STATUS COLORS ======== */
.day.available {
  background: #e9f7ef;
  border-color: #2ecc71;
}

.day.occupied {
  background: #FEB0A7;
  border-color: #e74c3c;
}

.day.check-in {
  background: linear-gradient(135deg, #97F0BD 50%, #E77A6D 50%);
  border-color: #2ecc71;
}

.day.check-out {
  background: linear-gradient(135deg, #E77A6D 50%, #97F0BD 50%);
  border-color: #e74c3c;
}

/* ======== TOOLTIP ======== */
.tooltip {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c3e50;
  color: #fff;
  font-size: 0.7em;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  white-space: nowrap;
  z-index: 10;
}

.day:hover .tooltip {
  opacity: 1;
}

/* ======== LEGEND ======== */
.legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 25px;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50 !important;
  font-weight: 500;
  font-size: 0.9em;
  white-space: nowrap;
}

.legend-item span {
  color: #2c3e50 !important;
  font-weight: 500;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid;
  flex-shrink: 0;
}

.legend-available {
  background: #9CE5BB !important;
  border-color: #2ecc71 !important;
}

.legend-occupied {
  background: #FEB0A7 !important;
  border-color: #e74c3c !important;
}

.legend-check-in {
  background: linear-gradient(135deg, #9CE5BB 50%, #FEB0A7 50%) !important;
  border-color: #2ecc71 !important;
}

.legend-check-out {
  background: linear-gradient(135deg, #FEB0A7 50%, #9CE5BB 50%) !important;
  border-color: #e74c3c !important;
}

/* ======== MOBILE RESPONSIVE ======== */
@media (max-width: 992px) {
  .calendar-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .calendar-container {
    padding: 15px;
    margin: 20px auto;
  }
  
  .month {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .calendar-container {
    padding: 12px;
    margin: 15px auto;
    border-radius: 12px;
  }
  
  .month {
    padding: 12px;
  }
  
  .day {
    height: 40px;
    line-height: 40px;
    font-size: 0.85em;
  }
  
  .day-name {
    font-size: 0.75em;
    padding: 8px 0;
  }
  
  .calendar-grid {
    gap: 4px;
  }
  
  .current-period {
    font-size: 1em;
    min-width: 250px;
  }
  
  .legend {
    gap: 15px;
    padding: 12px;
    justify-content: center;
  }
  
  .legend-item {
    font-size: 0.85em;
  }
}

@media (max-width: 480px) {
  .calendar-container {
    padding: 10px;
    margin: 10px auto;
  }
  
  .month {
    padding: 10px;
  }
  
  .day {
    height: 35px;
    line-height: 35px;
    font-size: 0.8em;
  }
  
  .day-name {
    font-size: 0.7em;
    padding: 6px 0;
  }
  
  .calendar-navigation {
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1em;
  }
  
  .current-period {
    min-width: 200px;
    font-size: 0.9em;
  }
  
  .legend {
    gap: 12px;
    padding: 10px;
  }
  
  .legend-item {
    font-size: 0.8em;
  }
  
  .tooltip {
    font-size: 0.65em;
    bottom: -28px;
    padding: 3px 6px;
  }
}