/* Outlook ICS Calendar — inherits your theme's fonts and text color.
   Change the accent by overriding --oics-accent in Appearance → Customize → Additional CSS, e.g.
   .oics { --oics-accent: #b5121b; } */

.oics {
	--oics-accent: #0f6cbd;
	--oics-line: rgba(127, 127, 127, 0.28);
	--oics-soft: rgba(127, 127, 127, 0.08);
	--oics-muted: rgba(127, 127, 127, 0.95);
	--oics-radius: 8px;
	margin: 1.5em 0;
	line-height: 1.45;
}

.oics *,
.oics *::before,
.oics *::after { box-sizing: border-box; }

.oics__title { margin: 0 0 0.75em; }
.oics__empty,
.oics--notice p { color: var(--oics-muted); font-style: italic; }

.oics summary { cursor: pointer; }
.oics .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ---------- List view ---------- */

.oics__days,
.oics__events { list-style: none; margin: 0; padding: 0; }

.oics__day { margin: 0 0 1.5em; padding: 0; }

.oics__date {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5em;
	margin: 0 0 0.5em; padding-bottom: 0.35em;
	font-size: 1.05em; border-bottom: 2px solid var(--oics-accent);
}
.oics__dow { font-weight: 700; }
.oics__fulldate { font-weight: 400; color: var(--oics-muted); }
.oics__day.is-today .oics__dow { color: var(--oics-accent); }

.oics__event {
	display: grid; grid-template-columns: 11em 1fr; gap: 1em;
	margin: 0; padding: 0.7em 0;
	border-bottom: 1px solid var(--oics-line);
}
.oics__event:last-child { border-bottom: 0; }

.oics__time { font-variant-numeric: tabular-nums; color: var(--oics-muted); font-size: 0.95em; }
.oics__summary { font-weight: 600; }
.oics__summary a { color: inherit; text-decoration-color: var(--oics-accent); }
.oics__location { font-size: 0.92em; color: var(--oics-muted); margin-top: 0.15em; }

.oics__more { margin-top: 0.35em; font-size: 0.92em; }
.oics__more > summary { color: var(--oics-accent); }
.oics__desc { margin-top: 0.4em; overflow-wrap: anywhere; }

@media (max-width: 600px) {
	.oics__event { grid-template-columns: 1fr; gap: 0.2em; }
}

/* ---------- Month view ---------- */

.oics__nav {
	display: flex; align-items: center; justify-content: space-between; gap: 0.75em;
	margin-bottom: 0.75em;
}
.oics__month { font-size: 1.3em; font-weight: 700; text-align: center; flex: 1; }
.oics__navright { display: flex; gap: 0.5em; }
.oics__navlink {
	display: inline-block; padding: 0.35em 0.8em;
	border: 1px solid var(--oics-line); border-radius: 999px;
	text-decoration: none; color: inherit; font-size: 0.9em; white-space: nowrap;
}
.oics__navlink:hover,
.oics__navlink:focus { border-color: var(--oics-accent); color: var(--oics-accent); }

.oics__grid {
	width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0;
	border: 1px solid var(--oics-line);
}
.oics__grid th {
	padding: 0.5em 0.25em; font-size: 0.8em; font-weight: 600; text-transform: uppercase;
	letter-spacing: 0.04em; text-align: center; color: var(--oics-muted);
	border: 1px solid var(--oics-line); background: var(--oics-soft);
}
.oics__grid abbr { text-decoration: none; border: 0; }

.oics__cell {
	vertical-align: top; height: 7.5em; padding: 0.3em;
	border: 1px solid var(--oics-line);
}
.oics__cell.is-other-month { background: var(--oics-soft); }
.oics__cell.is-other-month .oics__daydigit { opacity: 0.45; }

.oics__daynum { text-align: right; font-size: 0.85em; margin-bottom: 0.2em; }
.oics__daylabel { display: none; }
.oics__daydigit {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 1.8em; height: 1.8em; border-radius: 999px;
}
.oics__cell.is-today .oics__daydigit { background: var(--oics-accent); color: #fff; font-weight: 700; }

.oics__chips { list-style: none; margin: 0; padding: 0; }
.oics__chip { margin: 0 0 3px; padding: 0; position: relative; font-size: 0.8em; }
.oics__chip > details > summary {
	list-style: none; display: block;
	padding: 0.15em 0.4em; border-radius: 4px;
	border-left: 3px solid var(--oics-accent);
	background: var(--oics-soft);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oics__chip > details > summary::-webkit-details-marker { display: none; }
.oics__chip.is-allday > details > summary { background: var(--oics-accent); color: #fff; }
.oics__chiptime { font-variant-numeric: tabular-nums; opacity: 0.8; }

.oics__pop {
	position: absolute; z-index: 20; top: calc(100% + 4px); left: 0;
	width: max(15em, 100%); max-width: 22em; padding: 0.7em 0.8em;
	background: Canvas; color: CanvasText;
	border: 1px solid var(--oics-line); border-radius: var(--oics-radius);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
	font-size: 1.1em; white-space: normal;
}
.oics__grid td:nth-child(n+5) .oics__pop { left: auto; right: 0; }
.oics__pop .oics__time { margin-bottom: 0.3em; font-size: 0.9em; }
.oics__pop .oics__desc { max-height: 12em; overflow: auto; font-size: 0.92em; }

/* Phones: collapse the grid into an agenda of days that have events. */
@media (max-width: 700px) {
	.oics__grid,
	.oics__grid tbody,
	.oics__grid tr,
	.oics__grid td { display: block; width: 100%; border: 0; }
	.oics__grid thead { display: none; }
	.oics__cell { height: auto; padding: 0.6em 0; border-bottom: 1px solid var(--oics-line) !important; }
	.oics__cell.is-empty,
	.oics__cell.is-other-month { display: none; }
	.oics__daynum { text-align: left; font-size: 1em; font-weight: 700; }
	.oics__daylabel { display: inline; }
	.oics__daydigit { display: none; }
	.oics__cell.is-today .oics__daylabel { color: var(--oics-accent); }
	.oics__chip { font-size: 0.95em; margin-bottom: 6px; }
	.oics__chip > details > summary { white-space: normal; padding: 0.4em 0.6em; }
	.oics__pop { position: static; width: auto; max-width: none; box-shadow: none; margin-top: 4px; }
	.oics__nav { flex-wrap: wrap; }
}
