/* =====================================================================================
   КАЛЕНДАРЬ ПРАЗДНИКОВ — PILGRIM PROGRAM
   Полный стиль страницы calendar.html
   ===================================================================================== */

/* === 1. Основной контейнер ========================================================= */
.calendar-container {
  text-align: center;
  color: var(--muted, #7b5a34);
  font-size: 0.95rem;
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
  background: #fffef9;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  border: 1px solid #e0c187;
}

/* === 2. Верхняя строка: месяц и стрелки =========================================== */
.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 0.6rem;
  background: linear-gradient(180deg, #fff8d9, #f8f1c2);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.calendar-month {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-h2, #8b5e3c);
  white-space: nowrap;
}

.month-nav {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--cherry, #633402);
  cursor: pointer;
  transition: color .2s, transform .2s;
  padding: 4px 10px;
  display: flex;
  align-items: center;
}
.month-nav:hover {
  color: var(--gold, #c7a764);
  transform: scale(1.2);
}

/* Подзаголовок под месяцем */
.calendar-subtitle {
  text-align: center;
  color: var(--muted, #7b5a34);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  font-style: italic;
}

/* === 3. Заголовки дней недели ====================================================== */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  color: #5a4633;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fffef5, #f7eed2);
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  overflow: hidden;
}

.calendar-weekdays div {
  padding: 6px 0;
  transition: background 0.3s ease, color 0.3s ease;
  border-right: 1px solid #f1e2b8;
}
.calendar-weekdays div:last-child {
  border-right: none;
}

.calendar-weekdays .saturday {
  color: #79591d;
}
.calendar-weekdays .sunday {
  color: #b24a1f;
  font-weight: 700;
}
.calendar-weekdays div:hover {
  background: #fff5d1;
  color: #7b3f00;
}

/* === 4. Сетка дней месяца ========================================================= */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  margin-bottom: 2rem;
}

.calendar-day {
  padding: 10px 0;
  border-radius: 6px;
  background: #f8f4ea;
  font-size: 0.9rem;
  color: #5a4633;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}

.calendar-day:hover {
  background: #efe1c4;
}

/* === Реальный сегодняшний день === */
.calendar-day.today-real {
    background: linear-gradient(180deg, #fcf6ea 0%, #f3e4c0 90%);
  border: 1px solid #b38b2f;
  color: #5a4633;
  box-shadow:
    0 0 8px rgba(179,139,47,0.3),
    inset 0 0 4px rgba(255,255,255,0.6);
  z-index: 1;
  
}

/* === День, выбранный пользователем === */
.calendar-day.today-selected {
  background: linear-gradient(180deg, #fff9db 0%, #ffe8a1 85%);
  box-shadow:
    inset 0 0 0 2px #d4a93a,           /* имитация рамки, без сдвига */
    0 0 12px rgba(212,169,58,0.45),
    inset 0 0 5px rgba(255,255,255,0.8);
  font-weight: 600;
  color: #4a381c;
  z-index: 2;
  transition: all 0.2s ease;
}


/* === 5. Подсказка при наведении =================================================== */
.calendar-tooltip {
  display: none;
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  background: #fffdf7;
  border: 1px solid #d6b870;
  border-radius: 10px;
  padding: 10px 14px;
  color: #3d2b1f;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  width: 300px;            /* ← шире для длинных названий */
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  z-index: 10;
  pointer-events: none;
  transition: opacity .2s ease;
  opacity: 0;
}
.calendar-day:hover .calendar-tooltip {
  display: block;
  opacity: 1;
}
.calendar-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  border-width: 7px;
  border-style: solid;
  border-color: #d6b870 transparent transparent transparent;
}

/* отдельный праздник внутри подсказки */
.calendar-tooltip .tooltip-item {
  padding: 2px 0 3px 0;
  border-bottom: 1px solid rgba(214,184,112,0.3);
}
.calendar-tooltip .tooltip-item:last-child {
  border-bottom: none;
}

/* мягкий hover, если понадобится для будущего интерактива */
.calendar-tooltip .tooltip-item:hover {
  background: rgba(240,220,160,0.15);
}




/* ========================== Мобильная адаптация — всегда внизу ========================== */
@media (max-width: 768px) {
  .calendar-month { font-size: 1.3rem; }
  .calendar-grid { gap: 4px; }
  .calendar-weekdays div { font-size: 0.85rem; padding: 4px 0; }
}
