/* Календар новин — вигляд як News Calendar (blue-arrows) на старому сайті */

.pf-cal { font-family: Arial, Helvetica, sans-serif; color: #666; }
.pf-cal.loading { opacity: 0.5; pointer-events: none; }

.pf-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 2px; margin-bottom: 10px; }
.pf-cal-head button {
  background: none; border: 0; color: #2f79d4; font-size: 1.15rem; line-height: 1; padding: 4px 6px; cursor: pointer; border-radius: 4px;
}
.pf-cal-head button:hover { background: #eef5fe; }
.pf-cal-title { flex: 1; text-align: center; font-weight: 700; font-size: 0.85rem; color: #555; line-height: 1.5; }

.pf-cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.8rem; }
.pf-cal-grid th { font-weight: 700; color: #555; padding: 6px 0; text-align: center; }
.pf-cal-grid td { position: relative; text-align: center; padding: 0; height: 33px; }
.pf-cal-grid .we { color: #e2342f; }
.pf-cal-grid .out { color: #c4c4c4; }

/* Число дня — у «клітинці»; сьогодні — блакитний квадратик з рамкою, як на старому сайті */
.pf-cal-n { display: inline-block; min-width: 24px; padding: 2px 0; line-height: 19px; border: 1px solid transparent; border-radius: 2px; }
.pf-cal-grid td.today .pf-cal-n { font-weight: 700; border-color: #2f79d4; background: #bcd6f7; color: #333; }

.pf-cal-day {
  position: relative; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer;
}
.pf-cal-day::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #333;
}
td.today .pf-cal-day::after { background: #1f5ea9; }

.pf-cal-tip {
  display: none; position: absolute; z-index: 20; top: 100%; left: 50%; transform: translateX(-30%);
  min-width: 220px; max-width: 260px; padding: 10px 12px; text-align: left;
  background: rgba(30, 30, 30, 0.94) !important; color: #fff; border: 0; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
/* картка модуля обрізає вміст (overflow: hidden) — для календаря дозволяємо підказці виходити за межі */
.card:has(.pf-cal) { overflow: visible !important; }
.pf-cal-tip ul { list-style: none; margin: 0 !important; padding: 0 !important; }
.pf-cal-tip li + li { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.pf-cal-tip a { color: #fff !important; text-decoration: none; font-weight: 700; font-size: 0.8rem; line-height: 1.35; display: block; }
.pf-cal-tip a:hover { text-decoration: underline; }

/* Пн–Чт — підказка відкривається вправо від дня, Пт–Нд — вліво, щоб не вилазити за колонку */
.pf-cal-grid td:nth-child(-n+4) .pf-cal-tip { left: 0; right: auto; transform: none; }
.pf-cal-grid td:nth-child(n+5) .pf-cal-tip { left: auto; right: 0; transform: none; }

td.has:hover .pf-cal-tip, td.has:focus-within .pf-cal-tip, td.has.open .pf-cal-tip { display: block; }
/* щоб курсор міг перейти з дня на підказку без «дірки» */
.pf-cal-tip::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
