@charset "UTF-8";
/* Tour Date Picker Styles */
.date-picker-trigger {
  margin-bottom: 15px;
  position: relative;
}

.date-picker-btn {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background: #ffffff;
  color: #495057;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}
.date-picker-btn:hover {
  border-color: #e40808;
  color: #e40808;
  background: #f8f9fa;
}
.date-picker-btn:hover .fas {
  color: #e40808;
}
.date-picker-btn:focus {
  outline: none;
  border-color: #e40808;
  box-shadow: 0 0 0 3px rgba(167, 40, 40, 0.1);
}
.date-picker-btn .fas {
  color: #6c757d;
  transition: color 0.2s ease;
}

.tour-date-picker {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: -moz-fit-content;
  max-width: fit-content;
  position: absolute;
  top: 100%;
  z-index: 3;
  border: 1px solid #e9ecef;
}
.tour-date-picker.loading {
  pointer-events: none;
  opacity: 0.7;
}
.tour-date-picker.loading::after {
  content: "Đang tải...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  color: #495057;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.date-picker-header {
  margin-bottom: 20px;
}
.date-picker-header h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.month-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.month-navigation .nav-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #495057;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.2s ease;
}
.month-navigation .nav-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
}
.month-navigation .nav-btn:active {
  transform: translateY(0);
}
.month-navigation .current-month {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-align: center;
  flex: 1;
}

.date-picker-calendar {
  margin-bottom: 20px;
}
.date-picker-calendar .weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 8px;
}
.date-picker-calendar .weekdays .weekday {
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
}
.date-picker-calendar .dates-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: #f8f9fa;
  padding: 4px;
  border-radius: 8px;
}

.date-cell {
  aspect-ratio: 1;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  background: #ffffff;
}
.date-cell.empty {
  background: transparent;
  cursor: default;
}
.date-cell.available {
  background: #f5e8e8;
  border: 2px solid #e40808;
  color: #571515;
}
.date-cell.available:hover {
  background: #e40808;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(167, 40, 40, 0.3);
}
.date-cell.available:hover .date-price {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
.date-cell.available:hover::before {
  opacity: 1;
}
.date-cell.available.selected {
  background: #e40808;
  color: white;
  box-shadow: 0 0 0 3px rgba(167, 40, 40, 0.3);
  animation: dateSelect 0.3s ease-in-out;
}
.date-cell.available.selected .date-price {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
.date-cell.available::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #e40808, #c92020);
  border-radius: 8px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.2s ease;
}
.date-cell.unavailable {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}
.date-cell.unavailable:hover {
  background: #f8f9fa;
  transform: none;
  box-shadow: none;
}

.date-number {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.date-price {
  display: none;
  font-size: 10px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.unavailable-text {
  font-size: 10px;
  font-weight: 500;
  color: #adb5bd;
  font-style: italic;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}
.legend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #495057;
}
.legend .legend-item .legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid #dee2e6;
}
.legend .legend-item .legend-color.available {
  background: #e40808;
  border-color: #e40808;
}
.legend .legend-item .legend-color.unavailable {
  background: #f8f9fa;
  border-color: #dee2e6;
}

@keyframes dateSelect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 768px) {
  .date-picker-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  .tour-date-picker {
    padding: 15px;
    margin: 0 10px;
    max-width: calc(100vw - 40px);
    left: 20px !important;
    right: 20px;
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%);
    z-index: 9999;
  }
  .date-picker-header h3 {
    font-size: 16px;
  }
  .month-navigation .current-month {
    font-size: 14px;
  }
  .month-navigation .nav-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .date-cell {
    min-height: 50px;
  }
  .date-cell .date-number {
    font-size: 12px;
  }
  .date-cell .date-price {
    font-size: 9px;
    padding: 1px 3px;
  }
  .legend {
    gap: 15px;
  }
  .legend .legend-item {
    font-size: 11px;
  }
}
@media (max-width: 480px) {
  .tour-date-picker {
    padding: 12px;
  }
  .date-cell {
    min-height: 45px;
  }
  .date-picker-calendar .weekdays .weekday {
    font-size: 11px;
    padding: 6px 2px;
  }
  .legend {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
}
