html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.social-icon {
  font-size: 1.25rem;
}

@media (max-width: 767px) {
  .social-icon {
    font-size: 1.6rem;
  }
}

/* Live "today" calendar icon (navbar) — pure CSS, no image */
.navcal {
  position: relative;
  display: inline-block;
  width: 2em;
  height: 2em;
  font-size: 1.05rem;
  line-height: 1;
  text-align: center;
  background: #fff;
  border-radius: 0.28em;
  overflow: hidden;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.25);
}

.navcal .navcal-m {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.18em 0;
  font-size: 0.52em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #8B44AC;
}

.navcal .navcal-d {
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  font-weight: 700;
  color: #2f2f2f;
}

@media (max-width: 575.98px) {
  .navcal {
    font-size: 1.25rem; /* slightly larger tap target on phones */
  }
}

.popover-bell {
  --bs-popover-border-color: #FFA566;
  --bs-popover-arrow-border: #FFA566;
  --bs-popover-header-bg: #FFD4A3;
  --bs-popover-header-color: #6B3000;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== Kalendár ===== */
.kal-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kal-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.kal-head {
  position: relative;
  min-width: 0;
  text-align: center;
  padding: 0.4rem 0.25rem;
  border-bottom: 2px solid var(--bs-border-color);
  font-weight: 600;
}

.kal-daydate {
  display: block;
  font-weight: 400;
  font-size: 0.8em;
  color: var(--bs-secondary-color);
}

.kal-head-pin {
  position: absolute;
  top: 0.25rem;
  right: 0.35rem;
  color: #C28A00;
  font-size: 0.75rem;
}

.kal-dayname-full { display: none; }
.kal-dayname-short { display: inline; }

@media (min-width: 576px) {
  .kal-dayname-full { display: inline; }
  .kal-dayname-short { display: none; }
}

.kal-cell {
  min-width: 0;
  min-height: 5rem;
  padding: 4px;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kal-today {
  outline: 2px solid #8B44AC;
  outline-offset: -2px;
  border-radius: 0.4rem;
}

.kal-chip {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  color: #333;
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.kal-chip:hover {
  color: #000;
  filter: brightness(0.96);
}

.kal-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kal-chip-span {
  font-weight: 600;
}

.kal-more {
  font-size: 0.72rem;
  text-decoration: none;
  margin-top: auto;
}

.kal-more:hover {
  text-decoration: underline;
}

/* Name day (meniny) — desktop only, hidden when there is not enough width */
.kal-meniny {
  display: none;
  font-weight: 400;
  font-size: 0.72em;
  color: var(--bs-secondary-color);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 992px) {
  .kal-meniny {
    display: block;
  }
}

/* Week picker (clickable week label opens a native date picker) */
.kal-weekpicker {
  color: var(--bs-body-color);
}

.kal-weekpicker:hover {
  color: #8B44AC;
}

.kal-date-input {
  display: none;
}

/* Flatpickr: dot under days that have an announcement */
.flatpickr-day.kal-has-event {
  font-weight: 700;
}

.flatpickr-day.kal-has-event::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8B44AC;
}

.flatpickr-day.kal-has-event.selected::after,
.flatpickr-day.kal-has-event.today::after {
  background: #fff;
}

/* Mobile-only colored swatch in the day panel */
.kal-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  flex: 0 0 auto;
}

/* Below the desktop breakpoint: a whole day is the tap target.
   Chips become non-interactive so taps open the day panel instead. */
@media (max-width: 991.98px) {
  .kal-cell-has-events {
    cursor: pointer;
  }

  .kal-cell-has-events::after {
    content: "";
    display: block;
    margin-top: auto;
    align-self: center;
    width: 1.5rem;
    height: 3px;
    border-radius: 2px;
    background: var(--bs-border-color);
  }

  .kal-cell a {
    pointer-events: none;
  }

  .kal-cell-active {
    background: rgba(139, 68, 172, 0.08);
    outline: 2px solid #8B44AC;
    outline-offset: -2px;
  }
}

/* ===== Kalendár — month view ===== */
.kal-month {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kal-mrow {
  display: grid;
  grid-template-columns: 1.7em repeat(5, 1fr);
  gap: 6px;
}

.kal-mhead {
  min-width: 0;
  text-align: center;
  padding: 0.4rem 0.15rem;
  border-bottom: 2px solid var(--bs-border-color);
  font-weight: 600;
}

.kal-month-week {
  text-decoration: none;
  color: inherit;
  border-radius: 0.45rem;
}

.kal-month-week:hover {
  color: inherit;
  background: rgba(139, 68, 172, 0.08);
}

.kal-wknum {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
}

.kal-mcell {
  min-width: 0;
  min-height: 3.4rem;
  padding: 3px 4px;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
  display: flex;
  flex-direction: column;
}

.kal-mday {
  font-size: 0.8rem;
  font-weight: 600;
}

.kal-mout {
  background: var(--bs-tertiary-bg);
}

.kal-mout .kal-mday {
  color: var(--bs-secondary-color);
  opacity: 0.55;
}

.kal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: auto;
  padding-top: 2px;
}

.kal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.kal-dot.pinned {
  box-shadow: 0 0 0 2px #C28A00;
}

/* ===== Seasonal navbar/footer tint (body.season-*) — layered over the theme bg, so visible in light and dark ===== */
body.season-summer      { --season-tint: rgba(245, 196, 0, 0.12); }
body.season-spring      { --season-tint: rgba(124, 203, 110, 0.16); }
body.season-easter      { --season-tint: rgba(244, 143, 177, 0.16); }
body.season-autumn      { --season-tint: rgba(201, 124, 45, 0.16); }
body.season-schoolstart { --season-tint: rgba(76, 175, 80, 0.14); }
body.season-winter      { --season-tint: rgba(120, 160, 190, 0.20); }
body.season-christmas   { --season-tint: rgba(180, 40, 50, 0.14); }

.navbar.bg-body-tertiary {
  background-image: linear-gradient(var(--season-tint, transparent), var(--season-tint, transparent));
}

footer.footer {
  background-image: linear-gradient(var(--season-tint, transparent), var(--season-tint, transparent));
}