/* Base theme — pure white background */
.kh-calendar{
  --accent:#132945;         /* keep your green accent */
  --bg:#ffffff;             /* pure white background */
  font-family:system-ui,Segoe UI,Roboto,Arial,sans-serif;
}

/* Controls */
.kh-calendar__controls{align-items:left;}
.kh-title{text-align:left;}
.kh-title .kh-selected{font-size:.9rem;color:#132945;}

/* Layout */
.kh-wrap{display:grid;grid-template-columns:2fr 1fr;gap:1rem}

/* Panels — pure white background and subtle borders */
.kh-grid{
  background:#ffffff;                 /* changed to white */
  border:1px solid #e5e5e5;
  border-radius:8px;
  padding:8px;
}
.kh-sidebar{
  background:#ffffff;                 /* changed to white */
  border:1px solid #e5e5e5;
  border-radius:8px;
  padding:.5rem;
}
.kh-sidebar h3{margin:.25rem 0 .5rem}

/* Grid structure */
.kh-weekdays,.kh-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.kh-weekdays div{font-weight:600;text-align:center;padding:.25rem; color:#132945}
.kh-weekdays .sunday{color:red}

/* Fixed-size rows at 140px (single source of truth) */
.kh-days{grid-auto-rows:140px}

/* Day cells */
.kh-day{
  background:#ffffff;
  border:1px solid #e5e5e5;
  border-radius:6px;
  position:relative;
  padding:.25rem;
  cursor:pointer;
  display:flex; flex-direction:column;
  overflow:hidden;
}
.kh-day.sunday{background:#E2F2FF}
.kh-day.selected{outline:3px solid var(--accent)}
.kh-day .num{position:absolute;top:6px;right:6px;font-size:.85rem;color:#888}
.kh-day .items{margin-top:18px;height:calc(100% - 18px);overflow:auto}

/* Event chips */
.kh-event{
  margin:.25rem 0;
  padding:.25rem .35rem;
  border-left:4px solid var(--accent);
  background:#E2F2FF;
  border-radius:4px;
  font-size:.85rem;
  cursor:pointer;
}
.kh-event.small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Today button */
.kh-today{
  background:var(--accent);
  color:white;
  border:none;
  border-radius:6px;
  padding:.25rem .5rem;
  margin-left:.5rem;
  cursor:pointer;
}

/* Modal (glass/frosted style + smooth animation) */
.kh-modal{
  position:fixed;top:0;left:0;width:100%;height:100%;
  background:rgba(0,0,0,.35);
  backdrop-filter:blur(6px);
  display:none;align-items:center;justify-content:center;
  z-index:9999;
}
.kh-modal.open{display:flex}
.kh-modal-content{
  background:rgba(255,255,255,0.94);  /* stays white glass */
  padding:1rem;border-radius:12px;
  max-width:560px;width:92%;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  position:relative;opacity:0;
  transform:translateY(10px) scale(.98);
  animation:khFadeIn .18s ease-out forwards;
}
.kh-close{
  position:absolute;top:.5rem;right:.5rem;
  background:none;border:none;font-size:1.5rem;cursor:pointer;
}

/* Animation */
@keyframes khFadeIn{to{opacity:1; transform:translateY(0) scale(1);}}

/* Responsive */
@media (max-width:900px){
  .kh-wrap{grid-template-columns:1fr}
  .kh-sidebar{order:-1}
}
