/* Gigi Calendar: layout only. The look comes from the style's own classes and from gcalendar_theme.css. */
.gcal {
	font-size: 11px;
	line-height: 1.4;
}

/* Week strip. Two classes outweigh ul.topiclist and its list items. */
.gcal-week-head {
	display: flex;
	justify-content: space-between;
}

.gcal .gcal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.gcal .gcal-day {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* Folding the strip: the head stays, the class on <html> is set in overall_header_head_append */
.gcal-toggle {
	font-weight: normal;
}

/* The 14px icon must not make the head taller than a forum list header */
.gcal-toggle .icon {
	line-height: 0;
}

.gcal-toggle-show,
.gcal-week-closed .gcal-toggle-hide,
.gcal-week-closed .gcal-grid {
	display: none;
}

.gcal-week-closed .gcal-toggle-show {
	display: inline;
}

.gcal-date {
	text-align: center;
	padding: 2px 0;
	font-weight: bold;
}

.gcal-cell {
	padding: 3px 4px;
	min-height: 44px;
}

.gcal-past {
	opacity: .7;
}

/* Entries */
.gcal-ev {
	position: relative;
	display: block;
	white-space: nowrap;
}

.gcal-cell .gcal-ev,
.gcal-month-day .gcal-ev {
	overflow: hidden;
	text-overflow: ellipsis;
}

.gcal-cell .gcal-ev:hover,
.gcal-month-day .gcal-ev:hover {
	overflow: visible;
}

.gcal-month-day .gcal-ev > .gcal-flag {
	display: block;
}

.gcal-time {
	color: var(--gcal-soft);
	font-size: 10px;
}

.gcal-ico {
	color: var(--gcal-icon);
}

.gcal-cake {
	color: var(--gcal-cancel);
}

.gcal-cancelled .gcal-link,
.gcal-cancelled .gcal-link .gcal-time,
.gcal-cancelled .gcal-link .gcal-title {
	color: var(--gcal-muted);
	text-decoration: line-through;
}

.gcal-flag {
	color: var(--gcal-cancel);
	font-weight: bold;
}

/* Preview on hover. Touch devices skip it, a tap goes straight to the post. */
.gcal-tip {
	display: none;
	position: absolute;
	left: 0;
	top: 100%;
	z-index: 20;
	width: 270px;
	padding: 6px 8px;
	white-space: normal;
	background: var(--gcal-tip-bg);
	border: 1px solid var(--gcal-tip-border);
	color: var(--gcal-text);
	font-weight: normal;
	text-decoration: none;
}

.gcal-tip hr {
	border: 0;
	border-top: 1px solid var(--gcal-rule);
	margin: 4px 0;
}

@media (hover: hover) {
	.gcal-ev:hover .gcal-tip {
		display: block;
	}
}

.gcal-day:nth-child(n+6) .gcal-tip {
	left: auto;
	right: 0;
}

/* Event line */
.gcal-line {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.gcal-line-head {
	font-weight: bold;
}

.gcal-line-items {
	flex: 1;
	line-height: 1.75;
}

.gcal-entry {
	display: inline-block;
	max-width: 100%;
	position: relative;
	white-space: nowrap;
}

.gcal-entry .gcal-ev {
	display: inline;
	position: static;
}

.gcal-entry + .gcal-entry::before {
	content: "|";
	color: var(--gcal-border);
	margin: 0 5px;
}

.gcal-day-label {
	font-weight: bold;
	color: var(--gcal-strong);
}

.gcal-day-today {
	color: var(--gcal-accent);
}

.gcal-empty {
	color: var(--gcal-soft);
}

.gcal-view-week .gcal-line {
	display: none;
}

@media (max-width: 700px) {
	.gcal-view-week .gcal-week {
		display: none;
	}

	.gcal-view-week .gcal-line {
		display: flex;
	}

	.gcal-entry {
		white-space: normal;
	}
}

/* Event form in the post editor */
.gcal-when input { margin-right: 6px; }

/* Event box in the topic */
.gcal-box-head {
	font-weight: bold;
}

.gcal-box-sub {
	color: var(--gcal-soft);
}

.gcal-box-row {
	align-items: center;
	border-top: 1px solid var(--gcal-head);
	display: flex;
	gap: 10px;
	margin-top: 3px;
	padding-top: 3px;
}

.gcal-box-date {
	min-width: 175px;
}

.gcal-box-off {
	color: var(--gcal-muted);
	text-decoration: line-through;
}

.gcal-box-state {
	flex: 1;
}

.gcal .gcal-box-button {
	padding: 1px 8px;
}

.gcal-box-more {
	border-top: 1px solid var(--gcal-head);
	margin-top: 3px;
	padding-top: 4px;
}

/* Month view */
.gcal-month-head {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.gcal-month-head strong {
	font-size: 13px;
}

.gcal .gcal-month-grid,
.gcal .gcal-month-cols {
	display: grid;
	grid-template-columns: 28px repeat(7, minmax(0, 1fr));
}

.gcal-month-dow,
.gcal-month-kw {
	padding: 2px 0;
	text-align: center;
}

.gcal-month-kw {
	color: var(--gcal-soft);
}

.gcal-month-day {
	min-height: 72px;
	min-width: 0;
	padding: 2px 4px;
}

.gcal-month-day.gcal-today .gcal-month-number {
	color: var(--gcal-accent);
}

.gcal-month-other .gcal-month-number {
	color: var(--gcal-muted);
}

.gcal-month-number {
	font-weight: bold;
	text-align: right;
}

.gcal-month-label {
	display: none;
	font-weight: bold;
}

.gcal-month-day:nth-child(8n) .gcal-tip,
.gcal-month-day:nth-child(8n+7) .gcal-tip {
	left: auto;
	right: 0;
}

@media (max-width: 700px) {
	.gcal .gcal-month-grid {
		display: block;
	}

	.gcal .gcal-month-cols,
	.gcal .gcal-month-kw,
	.gcal .gcal-month-dow,
	.gcal .gcal-month-empty,
	.gcal .gcal-month-number {
		display: none;
	}

	.gcal-month-day {
		min-height: 0;
		padding: 4px 8px;
	}

	.gcal-month-label {
		display: block;
	}
}

/* A long title may wrap, its day label stays with it */
@media (max-width: 700px) {
	.gcal-entry,
	.gcal-entry .gcal-ev {
		white-space: normal;
	}
}
