/* Исправленные стили для календаря — точное соответствие вашему примеру */
.ot-calendar-popup {
  position: fixed;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  z-index: 99999;
  font-family: "Open Sans", Arial, sans-serif;
  display: none;
  padding: 12px;
  width: 320px;
  max-width: 90vw;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  top: auto;
  left: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Стрелка под календарём */
.ot-calendar-popup::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 25px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid white;
  pointer-events: none;
}

/* Стрелка над календарём */
.ot-calendar-popup.top-arrow::before {
  top: auto;
  bottom: -8px;
  border-bottom: none;
  border-top: 8px solid white;
}

.ot-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 4px 8px;
  background: #f5f5f5;
  border-radius: 4px;
}

.ot-calendar-header button {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  color: #333;
}

.ot-calendar-header button:hover {
  background: #e9e9e9;
  border-color: #ccc;
  transform: scale(1.05);
}

.ot-calendar-header span {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  text-align: center;
  flex-grow: 1;
}

.ot-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.ot-calendar-days > div {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  font-weight: 500;
  border-radius: 0; /* Убираем закругления */
}

.ot-calendar-days .day-name {
  color: #666;
  font-size: 12px;
  background: none;
  cursor: default;
  font-weight: normal;
}

/* Статусы для дней (цвета цифр, а не фона) */
.ot-calendar-days .gds { 
  color: #007bff; 
  font-weight: 600;
}
.ot-calendar-days .charter { 
  color: #28a745; 
  font-weight: 600;
}
.ot-calendar-days .request { 
  color: #28a745; 
  opacity: 0.7;
  font-weight: 600;
}
.ot-calendar-days .few { 
  color: #ffc107; 
  font-weight: 600;
}
.ot-calendar-days .none { 
  color: #ccc; 
  cursor: not-allowed; 
  pointer-events: none;
}

/* Выделение диапазона — только цифры красятся */
.ot-calendar-days .selected-start,
.ot-calendar-days .selected-end {
  color: #007bff !important;
  font-weight: 600 !important;
  background: transparent !important;
  position: relative;
}

.ot-calendar-days .in-range {
  background: #e0f0ff;
  color: #007bff !important;
  font-weight: 600 !important;
}

/* Эффект при наведении */
.ot-calendar-days .day:hover {
  background: #f5f5f5;
  border-radius: 4px;
}

.ot-calendar-days .day.none:hover {
  background: transparent;
}

/* Легенда */
.ot-calendar-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 12px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  margin-top: 8px;
}

.ot-calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

/* Стили для кнопки даты */
.ot-date-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  font-size: 14px;
  transition: all 0.2s ease;
}

.ot-date-button:hover {
  color: #429410;
}
