/* Календарь */
.calendar-container {
    display: none;
    position: absolute;
    z-index: 1000;
    border: 2px solid #44a1d1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    background: white;
    width: 420px;
    margin-top: 5px;
}

.calendar-container.visible {
    display: flex;
    flex-wrap: nowrap;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Панель месяцев */
.months-panel {
    background: #f8f9fa;
}

.months-panel h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #44a1d1;
    font-size: 18px;
}

.months-list {
  background: #494848;
  color: #fff;
}

.months-list::-webkit-scrollbar {
    width: 8px;
}

.months-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.months-list::-webkit-scrollbar-thumb {
    background: #44a1d1;
    border-radius: 4px;
}

.months-list::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

@media (max-width: 768px) {
    .months-list {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
    }
}

.month-item {
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

.month-item:hover {
    background: #44a1d1;
    transform: translateY(-2px);
}

.month-item.active {
    background: #44a1d1;
    color: white;
    border-color: #2980b9;
}

.month-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
}

.month-item.disabled:hover {
    background: #f8f9fa;
    transform: none;
}

/* Основной календарь */

.calendar-header {
    color: #44a1d1;
    padding: 10px;
    font-size: 22px;
    font-weight: bold;
    width: 160px;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-radius: 6px;
}

.weekday {
    text-align: center;
    font-weight: bold;
    color: #2c3e50;
    padding: 12px 5px;
    font-size: 14px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f0f0f0;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.day-cell {
    background: white;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    position: relative;
}

.day-cell:hover {
    background: #f0f7ff;
    z-index: 1;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.day-cell.empty {
    background: #f8f9fa;
    cursor: default;
}

.day-cell.empty:hover {
    background: #f8f9fa;
    box-shadow: none;
}

.day-cell.past {
    background: #f8f9fa;
    color: #bdc3c7;
    cursor: not-allowed;
}

.day-cell.past:hover {
    background: #f8f9fa;
    box-shadow: none;
}

.day-cell.selected {
    background: linear-gradient(135deg, #44a1d1 0%, #2980b9 100%) !important;
    color: white !important;
}

.day-cell.weekend {
    background: #fff5f5;
    color: #ff6b6b;
}

.day-cell.weekend.past {
    background: #f8f9fa;
    color: #bdc3c7;
}

.day-cell.today {
    background: #e74c3c;
    color: white;
}

.day-cell.today:hover {
    background: #ff6b6b;
}

/* Текущий год */
.current-year-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 15px;
    margin-left: 10px;
    font-weight: bold;
}

.month-year-display {
  margin-left: 5px;
}

#cur_month_cont {
  align-content: center;
  font-size: 15px;
  width: 150px;
}