/* Live webinars: List / Calendar view (behaviour in assets/js/widgets.js, initWebinars).
 * The calendar is built from the ".dpc-webinars" cards; editors keep editing the cards. */

.dpc-wcal-toggle {
	display: flex;
	justify-content: center;
	gap: 0;
	margin: 28px auto 28px !important;
	width: max-content;
	border: 1.5px solid var(--wp--preset--color--sky, #00b8f9);
	border-radius: 600px;
	padding: 3px;
	background: #fff;
}
.dpc-wcal-toggle button {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--navy, #003a63);
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .02em;
	text-transform: uppercase;
	padding: 8px 22px;
	border-radius: 600px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.dpc-wcal-toggle button svg { width: 16px; height: 16px; flex: none; }
.dpc-wcal-toggle button[aria-pressed="true"] {
	background: var(--wp--preset--color--navy, #003a63);
	color: #fff;
}
.dpc-wcal-toggle button:focus-visible,
.dpc-wcal-nav button:focus-visible,
.dpc-wcal a:focus-visible {
	outline: 3px solid var(--wp--preset--color--sky, #00b8f9);
	outline-offset: 2px;
}

.dpc-wcal[hidden], .dpc-webinars[hidden] { display: none !important; }

.dpc-wcal {
	max-width: 1100px;
	margin: 0 auto !important;
	background: #fff;
	border: 1px solid #e4e9ed;
	border-radius: 16px;
	box-shadow: 0 4px 18px rgba(0, 58, 99, .08);
	overflow: hidden;
}
.dpc-wcal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	background: var(--wp--preset--color--navy, #003a63);
	color: #fff;
}
.dpc-wcal-title {
	margin: 0 !important;
	font-size: 22px;
	font-weight: 800;
	color: #fff;
	text-align: center;
	flex: 1;
}
.dpc-wcal-nav button {
	appearance: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, .5);
	background: transparent;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.dpc-wcal-nav button:hover:not(:disabled) { background: var(--wp--preset--color--sky, #00b8f9); border-color: var(--wp--preset--color--sky, #00b8f9); }
.dpc-wcal-nav button:disabled { opacity: .3; cursor: default; }

.dpc-wcal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}
.dpc-wcal-dow {
	padding: 10px 8px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--navy-light, #4a6f8f);
	background: #f3f7fa;
	border-bottom: 1px solid #e4e9ed;
	text-align: center;
}
.dpc-wcal-day {
	min-height: 118px;
	padding: 8px;
	border-right: 1px solid #e4e9ed;
	border-bottom: 1px solid #e4e9ed;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.dpc-wcal-day:nth-child(7n + 7) { border-right: 0; }
.dpc-wcal-day.is-empty { background: #fafcfd; }
.dpc-wcal-day.is-weekend:not(.is-empty) { background: #fcfdfe; }
.dpc-wcal-num {
	font-size: 13px;
	font-weight: 700;
	color: #6b7c8a;
	line-height: 1;
}
.dpc-wcal-day.is-today .dpc-wcal-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: var(--wp--preset--color--sky, #00b8f9);
	color: #fff;
}
.dpc-wcal-day.has-events .dpc-wcal-num { color: var(--wp--preset--color--navy, #003a63); }
a.dpc-wcal-event {
	display: block;
	padding: 7px 8px;
	border-radius: 8px;
	background: #e6f7fe;
	border-left: 3px solid var(--wp--preset--color--sky, #00b8f9);
	color: var(--wp--preset--color--navy, #003a63);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: background .15s;
}
a.dpc-wcal-event:hover { background: #ccefff; }
a.dpc-wcal-event .dpc-wcal-cta {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sky-dark, #008ec7);
}
a.dpc-wcal-event.is-past { background: #f1f3f5; border-left-color: #b8c2cb; color: #6b7c8a; pointer-events: none; }
a.dpc-wcal-event.is-past .dpc-wcal-cta { color: #8a98a5; }

/* Phones and narrow tablets: agenda list instead of the 7-column grid */
.dpc-wcal-agenda { display: none; list-style: none; margin: 0 !important; padding: 8px 16px 16px !important; }
.dpc-wcal-agenda li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #e4e9ed; margin: 0 !important; }
.dpc-wcal-agenda li:last-child { border-bottom: 0; }
.dpc-wcal-date {
	flex: none;
	width: 56px;
	text-align: center;
	border-radius: 10px;
	background: #e6f7fe;
	color: var(--wp--preset--color--navy, #003a63);
	padding: 6px 0;
	line-height: 1.1;
}
.dpc-wcal-date b { display: block; font-size: 22px; font-weight: 800; }
.dpc-wcal-date span { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.dpc-wcal-agenda a.dpc-wcal-event { flex: 1; font-size: 15px; }
.dpc-wcal-empty { padding: 28px 16px; text-align: center; color: #6b7c8a; margin: 0 !important; }

@media (max-width: 760px) {
	.dpc-wcal-grid { display: none; }
	.dpc-wcal-agenda { display: block; }
	.dpc-wcal-title { font-size: 18px; }
	.dpc-wcal-head { padding: 12px 14px; }
}

/* Beat the theme's heading colour/spacing inside the navy calendar header */
.dpc-wcal .dpc-wcal-head h3.dpc-wcal-title { color: #fff !important; margin: 0 !important; font-size: 22px; line-height: 1.2; }
@media (max-width: 760px) { .dpc-wcal .dpc-wcal-head h3.dpc-wcal-title { font-size: 18px; } }
