/* ===== Base Styles ===== */
.kp-calendar {
  font-family: system-ui, sans-serif;
  border-radius: 6px;
  overflow: hidden;
  margin: 10px auto;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.kp-cal-header {
  background: linear-gradient(#0c5c94, #034b7a);
  color: #fff;
  text-align: center;
  padding: 6px 0;
  font-weight: 700;
  position: relative;
}
.kp-cal-header .kp-prev,
.kp-cal-header .kp-next {
  color: #fff;
  position: absolute;
  top: 5px;
  font-size: 18px;
  text-decoration: none;
}
.kp-cal-header .kp-prev { left: 10px; }
.kp-cal-header .kp-next { right: 10px; }
.kp-cal-header .kp-prev:hover,
.kp-cal-header .kp-next:hover { color: #fffc; }

/* ===== Header Title (shared for both yearly + monthly) ===== */
.kp-cal-header .kp-title {
  color: #fff !important;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.75);
  padding-bottom: 2px;
  transition: border-bottom 0.25s ease;
}
.kp-cal-header .kp-title:hover {
  border-bottom: 1px solid #fff;
}

/* Monthly header: larger + bolder */
.kp-calendar.kp-monthly .kp-cal-header .kp-title {
  font-size: 20px;
  font-weight: 800;
}

/* Yearly header: smaller but still dotted underline */
.kp-calendar.kp-yearly .kp-cal-header .kp-title {
  font-size: 15px;
  font-weight: 700;
}

/* ===== Table & Shared Elements ===== */
.kp-cal-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}
.kp-cal-table th {
  background: #f2f4f6;
  font-weight: 700;
  color: #333;
}
.kp-cal-table td {
  background: #fff;
  text-align: center;
  vertical-align: middle;
  position: relative;
}
.kp-semana-col { width: 42px; }
.kp-semananr {
  background: #f7f8fa;
  color: #777;
  font-weight: 500;
  cursor: help;
}
.kp-cal-table td.holiday-official a,
.kp-cal-table td.holiday-official .kp-day {
  color: #AD182E;
  font-weight: 700;
  text-decoration: none;
}
.kp-cal-table td.holiday-ov a,
.kp-cal-table td.holiday-ov .kp-day {
  color: #005bbb;
  font-weight: 700;
  text-decoration: none;
}
.kp-cal-table td .kp-day {
  cursor: default;
  text-decoration: none;
}
.kp-cal-table td.holiday a:hover { text-decoration: underline; }
.kp-cal-table td.empty { background: #fafafa; }

/* === TODAY RING STYLE (with hover fill) === */
.kp-cal-table td.today {
  color: #0366d6;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.kp-cal-table td.today::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.1em;
  height: 2.1em;
  border: 2px solid #1e73be;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.kp-cal-table td.today:hover::after {
  background: rgba(30,115,190,0.12);
  box-shadow: 0 0 4px rgba(30,115,190,0.2);
}
.kp-cal-table td.today a {
  color: #0366d6;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

/* ===== Yearly Grid Mode (with borders) ===== */
.kp-calendar.kp-yearly { width: 260px; }
.kp-calendar.kp-yearly .kp-cal-table th,
.kp-calendar.kp-yearly .kp-cal-table td {
  padding: 4px;
  font-size: 14px;
  border: 1px solid #e0e4e8;
}
.kp-calendar.kp-yearly .kp-cal-table td { font-weight: 600; }
.kp-calendar.kp-yearly .kp-semananr {
  font-weight: 500;
  font-size: 0.9em;
  color: #777;
}
.kp-grid-yearly {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.kp-grid-yearly .kp-calendar {
  flex: 1 1 260px;
  max-width: 260px;
}
.kp-grid-yearly .kp-grid-ad {
  flex: 0 0 100%;
  width: 100%;
  display: block;
}
.kp-grid-yearly .kp-grid-ad > * {
  margin-left: auto;
  margin-right: auto;
}
.kp-grid-ad {
  flex: 1 1 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

/* ===== Monthly Mode (borderless modern) ===== */
.kp-calendar.kp-monthly { width: 370px; }
.kp-calendar.kp-monthly .kp-cal-header { padding: 10px 0; }
.kp-calendar.kp-monthly .kp-cal-table th,
.kp-calendar.kp-monthly .kp-cal-table td {
  padding: 6px;
  font-size: 18px;
  border: none;
}
.kp-calendar.kp-monthly .kp-cal-table td {
  font-weight: 600;
}
.kp-calendar.kp-monthly .kp-cal-table td.holiday a { font-size: 20px; }
.kp-calendar.kp-monthly .kp-cal-table td:hover { background: #f9fbff; }
.kp-calendar.kp-monthly .kp-semana-col { width: 60px; }
.kp-calendar.kp-monthly .kp-semananr {
  font-weight: 500;
  color: #777;
}

/* ===== Responsive ===== */
@media (max-width: 800px) {
  .kp-grid-yearly .kp-calendar { flex: 1 1 45%; max-width: 45%; }
}
@media (max-width: 540px) {
  .kp-grid-yearly .kp-calendar { flex: 1 1 100%; max-width: 100%; }
  .kp-calendar.kp-monthly { width: 100%; max-width: 370px; }
}

/* ===== HOLIDAY BOX (UNIFIED STYLE) ===== */
.kp-holiday-box {
  box-sizing: border-box;
  margin-top: 10px;
  padding: 10px 15px;
  border: 1px solid #e5e8eb;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
}

/* Shared item styling */
.kp-holiday-box .kp-holiday-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0;
}
.kp-holiday-box .kp-holiday-date {
  color: #AD182E;
  font-weight: 700;
  min-width: 110px;
  display: inline-block;
}
.kp-holiday-box .kp-holiday-name {
  color: #000;
  font-weight: 500;
}

/* ===== YEARLY LAYOUT (Two-column, grid-aligned, equal height) ===== */
.kp-holiday-yearly {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
  width: 100%;
  box-sizing: border-box;
}
.kp-holiday-yearly .kp-holiday-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ===== MONTHLY LAYOUT (Match monthly calendar width) ===== */
.kp-holiday-monthly {
  width: 370px;              /* matches monthly calendar width */
  max-width: 100%;
  margin: 10px auto 0 auto;  /* center align below calendar */
  box-sizing: border-box;
}

/* ===== HOLIDAY BOX EMPTY STATE ===== */
.kp-holiday-box .kp-holiday-empty {
  text-align: center;
  padding: 8px 0;
}
.kp-holiday-box .kp-holiday-empty .kp-holiday-date {
  color: #AD182E;
  font-weight: 700;
}

/* Official vs OV kleuren */
.kp-holiday-date.kp-holiday-official {
  color: #AD182E;
  font-weight: 700;
}
.kp-holiday-date.kp-holiday-ov {
  color: #005bbb;
  font-weight: 700;
}
/* Legend (footnote) styling */
.kp-holiday-legend {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.4;
}
/* Each legend row */
.kp-holiday-legend-line {
  display: flex;
  gap: 4px;
}
/* Make sure legend text inherits the small size */
.kp-holiday-legend .kp-holiday-date,
.kp-holiday-legend .kp-holiday-legend-text {
  font-size: inherit;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .kp-holiday-yearly {
    grid-template-columns: 1fr;  /* stack into one column on small screens */
  }
}

/* ===== Today's Date ===== */
.today-date {
  font-size: 16px;
  font-weight: 500;
  text-align: right;
  color: #222;
  margin-bottom: 10px;
}
.today-date br + * {
  color: #555;
  font-weight: 500;
}

/* === Yearly & Monthly Navigation (Final Version) === */
.kp-year-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 20px;
  font-family: inherit;
}

/* Navigation links */
.kp-year-nav a {
  color: #c41b47;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

/* Hover */
.kp-year-nav a:hover {
  text-decoration: underline;
  color: #ad182e; /* slightly darker red for hover */
}

/* SVG icons */
.kp-year-nav svg {
  vertical-align: middle;
  width: 14px;
  height: 14px;
}

/* Left icon spacing */
.kp-nav-left a svg {
  margin-right: 5px;
}

/* Right icon spacing */
.kp-nav-right a svg {
  margin-left: 5px;
}

.kp-semana-box {
  width: 100%;
  max-width: 330px;
  margin: 0 auto 20px;
  background: #fff;
  border: 1px solid #d0d6dc;
  border-radius: 10px;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.kp-semana-nav {
  text-align: center;
}

/* Header */
.kp-semana-header {
  background: linear-gradient(to bottom, #0b5ba1 0%, #084b86 100%);
  color: #fff;
  font-weight: 700;
  padding: 9px 0 8px;
  font-size: 16px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  line-height: 1.2;
}

/* Week number (now more compact) */
.kp-semana-number {
  font-size: 160px;           /* noticeably larger */
  font-weight: 700;
  line-height: 1;
  margin: 0;                  /* remove extra vertical margin */
  color: #000;
  height: 185px;              /* reduced from 220px → perfect visual center */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0em 0.4em 0.1em;
}

/* Date text */
.kp-semana-dates {
  font-size: 22px;
  color: #444;
  padding: 6px 0 14px;
  line-height: 1.3;
}

/* --- Mobile Adjustments --- */
@media (max-width: 480px) {
  .kp-semana-box {
    max-width: 90%;
    border-radius: 8px;
  }

  .kp-semana-header {
    font-size: 14px;
    padding: 7px 0;
  }

  .kp-semana-number {
    font-size: 110px;
    height: 120px;            /* now matches your competitor’s 140px box total */
  }

  .kp-semana-dates {
    font-size: 13px;
    padding: 4px 0 10px;
  }
}

/* --- Safety for Narrow Screens --- */
@media (max-width: 380px) {
  html, body {
    overflow-x: hidden;
  }
  .kp-semana-box {
    max-width: 94vw;
  }
}

/* --- Wrapper for scroll (kept minimal just for safety) --- */
.kp-numero-semana-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 10px;
}

/* --- Base table --- */
.kp-numero-semana-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: #fff;
  table-layout: fixed;
}

/* --- Header & cells --- */
.kp-numero-semana-table th {
  background: #f6f7f8;
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  border-bottom: 2px solid #e5e8eb;
  white-space: nowrap;
}

.kp-numero-semana-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e8eb;
  vertical-align: middle;
  white-space: nowrap;
}

/* --- Zebra striping --- */
.kp-numero-semana-table tr:nth-child(even) {
  background: #fafafa;
}

/* --- Color logic --- */
.kp-numero-semana-table tr.past-semana {
  color: #999;
  background: #f9f9f9;
}
.kp-numero-semana-table tr.current-semana {
  color: #AD182E;
  font-weight: 700;
  background: #fff7f8;
}
.kp-numero-semana-table tr:hover {
  background: #f5f5f5;
}

/* --- Column widths for desktop --- */
@media (min-width: 769px) {
  .kp-numero-semana-table th:nth-child(1),
  .kp-numero-semana-table td:nth-child(1) {
    width: 20%;
  }
  .kp-numero-semana-table th:nth-child(2),
  .kp-numero-semana-table td:nth-child(2),
  .kp-numero-semana-table th:nth-child(3),
  .kp-numero-semana-table td:nth-child(3) {
    width: 36%;
  }
  .kp-numero-semana-table th:nth-child(4),
  .kp-numero-semana-table td:nth-child(4) {
    width: 8%;
    text-align: right;
  }
}

/* --- Responsive adjustments for mobile --- */
@media (max-width: 768px) {
  .kp-numero-semana-table {
    font-size: 14px;
    table-layout: auto; /* allow natural shrink */
  }

  .kp-numero-semana-table th,
  .kp-numero-semana-table td {
    padding: 6px 6px;
    white-space: normal; /* allow wrapping */
  }

  .kp-numero-semana-table th {
    font-size: 13px;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .kp-numero-semana-table td:nth-child(4),
  .kp-numero-semana-table th:nth-child(4) {
    text-align: right;
  }
}

/* --- Desktop/Mobile view toggles --- */
.show-desktop { display: inline; }
.show-mobile { display: none; }

@media (max-width: 768px) {
  .show-desktop { display: none; }
  .show-mobile { display: inline; }
}

/* --- Scrollbar styling --- */
.kp-numero-semana-table-wrapper::-webkit-scrollbar {
  height: 6px;
}
.kp-numero-semana-table-wrapper::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}

/* --- Extra compact view for small mobiles --- */
@media (max-width: 480px) {
  .kp-numero-semana-table {
    font-size: 12px; /* was 14 / 15 */
  }

  .kp-numero-semana-table th,
  .kp-numero-semana-table td {
    padding: 4px 4px; /* tighter spacing */
  }

  .kp-numero-semana-table th {
    font-size: 11px;
  }

  /* Optional: keep last column readable but narrow */
  .kp-numero-semana-table th:nth-child(4),
  .kp-numero-semana-table td:nth-child(4) {
    text-align: right;
  }
}

/* Maanstanden Table */
.kp-moon-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
}

.kp-moon-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  background: #fff;
}

.kp-moon-table th {
  background: #f5f5f5;
  color: #000;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
}

.kp-moon-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}

.kp-moon-table tr:nth-child(even) {
  background: #fafafa;
}

.kp-moon-table tr:hover {
  background: #f0f0f0;
}

.kp-moon-table .kp-bold {
  font-weight: 700;
}

/* Highlight upcoming event */
.kp-moon-table .kp-next td {
  color: #AD182E;
  font-weight: 700;
}

/* Existing bold for Volle maan */
.kp-moon-table .kp-bold {
  font-weight: 700;
}

/* Responsive: keep table format */
@media (max-width: 480px) {
  .kp-moon-table {
    font-size: 14px;
  }
  .kp-moon-table th,
  .kp-moon-table td {
    padding: 6px 8px;
  }
}

/* Maankalender icons */
.kp-moon-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;   /* fix baseline alignment */
  margin-top: 1px;          /* fine-tune if still looks a bit high/low */
  margin-bottom: 3px;
}

/* Nuova Luna */
.kp-moon-new {
  background-image: url('/../../wp-content/uploads/2025/11/moon3.png');
}

/* Primo Quarto */
.kp-moon-first {
  background-image: url('/../../wp-content/uploads/2025/11/moon4.png');
}

/* Luna Piena */
.kp-moon-full {
  background-image: url('/../../wp-content/uploads/2025/11/moon1.png');
}

/* Ultimo Quarto */
.kp-moon-last {
  background-image: url('/../../wp-content/uploads/2025/11/moon2.png');
}

/* Giorni Festivi Table */
.kp-dias-festivos-wrapper,
.kp-ovdias-festivos-wrapper,
.kp-dias-festivoslist-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
}

.kp-dias-festivos-table,
.kp-ovdias-festivos-table,
.kp-dias-festivoslist-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  background: #fff;
}

.kp-dias-festivos-table th,
.kp-ovdias-festivos-table th,
.kp-dias-festivoslist-table th {
  background: #f5f5f5;
  color: #000;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
}

.kp-dias-festivos-table td,
.kp-ovdias-festivos-table td,
.kp-dias-festivoslist-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}

.kp-dias-festivos-table tr:nth-child(even),
.kp-ovdias-festivos-table tr:nth-child(even),
.kp-dias-festivoslist-table tr:nth-child(even) {
  background: #fafafa;
}

.kp-dias-festivos-table tr:hover,
.kp-ovdias-festivos-table tr:hover,
.kp-dias-festivoslist-table tr:hover {
  background: #f0f0f0;
}

/* Responsive: keep table format */
@media (max-width: 480px) {
  .kp-dias-festivos-table,
  .kp-ovdias-festivos-table,
  .kp-dias-festivoslist-table {
    font-size: 14px;
  }
  .kp-dias-festivos-table th,
  .kp-dias-festivos-table td,
  .kp-ovdias-festivos-table th,
  .kp-ovdias-festivos-table td,
  .kp-dias-festivoslist-table th,
  .kp-dias-festivoslist-table td {
    padding: 6px 8px;
  }
}

.kp-semanatable-nl {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.kp-semanatable-nl th {
  background: #f4f4f4;
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.kp-semanatable-nl td {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

/* Alternating rows */
.kp-semanatable-nl tbody tr:nth-child(even) {
  background: #fafafa;
}

/* Past weeks */
.kp-semanatable-nl .past-semana {
  color: #888;
}

/* Current week highlight */
.kp-semanatable-nl .current-semana td {
  font-weight: 700;
  color: #c41b47; /* your confirmed red */
  background: #fff4f6;
}

/* MOBILE OPTIMIZATION FOR WEEK TABLE */
@media (max-width: 480px) {
  .kp-semanatable-nl {
    font-size: 13px; /* was 15px */
  }

  .kp-semanatable-nl th,
  .kp-semanatable-nl td {
    padding: 4px 2px; /* tighter spacing */
  }

  .kp-semanatable-nl td.kp-semanatable-semana a {
    font-size: 13px;
  }

  .kp-semanatable-nl th {
    font-size: 12px;
  }

  .kp-semanatable-nl .current-semana td {
    font-size: 13px;
  }
}

.kp-holiday-link{
  color: inherit;
  text-decoration: none!important;
}
.kp-holiday-link:hover{
  text-decoration: underline;
}

