/* ============================================================
   Calendar App Styles (prefix: mc-) + Calendar widget extras
   ============================================================ */

.mc {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding-top: 54px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
}

/* Top: back/year, search and plus; month title with arrows; weekday letters */
.mc-nav { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 8px; color: var(--red); }
.mc-back { display: flex; align-items: center; gap: 6px; font-size: 17px; }
.mc-back svg { width: 12px; height: 21px; display: block; }
.mc-icons { display: flex; gap: 22px; }
.mc-ic svg { width: 24px; height: 24px; display: block; }
.mc-titlerow { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.mc-title { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.1; }
.mc-mon { color: var(--red); }
.mc-arrows { display: flex; gap: 4px; }
.mc-arrow { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--fill2); color: var(--red); display: grid; place-items: center; }
.mc-arrow svg { width: 9px; height: 16px; display: block; }
.mc-arrow:active { opacity: 0.6; }
.mc-wk { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 4px 8px; font-size: 11px; font-weight: 600; text-align: center; color: var(--label2); border-bottom: 0.5px solid var(--sep); }

/* Body scrolls on short screens, so the events list is always reachable */
.mc-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 34px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mc-body::-webkit-scrollbar { display: none; }

/* Month grid: 7 columns, Monday first, rows 56px tall */
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 56px; padding: 0 4px; }
.mc-day { position: relative; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; font: inherit; color: var(--label); }
.mc-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; line-height: 1; }
.mc-day.weekend .mc-n { color: var(--label2); }
.mc-day.today .mc-n { color: var(--red); font-weight: 600; }
.mc-day.sel .mc-n { background: var(--label); color: var(--bg); font-weight: 700; }
.mc-day.today.sel .mc-n { background: var(--red); color: #fff; }
.mc-dot { position: absolute; left: 50%; bottom: 1px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--label2); }

/* Events area for the selected day */
.mc-panel { margin-top: 10px; padding: 18px 16px 0; border-top: 0.5px solid var(--sep); }
.mc-head { margin-bottom: 16px; font-size: 14px; font-weight: 700; }
.mc-none { margin-top: 12px; font-size: 15px; color: var(--label2); }
.mc-ev { display: flex; align-items: stretch; gap: 10px; padding: 8px 0; }
.mc-ev-time { width: 64px; flex: 0 0 64px; text-align: right; font-size: 13px; line-height: 1.3; }
.mc-ev-time b { display: block; font-weight: 600; }
.mc-ev-time span { display: block; color: var(--label2); }
.mc-ev-bar { flex: 0 0 4px; width: 4px; border-radius: 2px; }
.mc-ev-main { min-width: 0; }
.mc-ev-main b { display: block; font-size: 15px; font-weight: 600; }
.mc-ev-main span { display: block; font-size: 13px; color: var(--label2); }

/* Home-screen widget extras (base rules are .w-cal in components.css) */
.w-cal .wev { overflow: hidden; }
.w-cal .wev b, .w-cal .wev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-cal .wmore { margin-top: 4px; font-size: 12px; color: #8e8e93; }
.w-cal .wnone { margin-top: auto; font-size: 12.5px; color: #8e8e93; }
