/* ============================================================
   ACSDOC Events — frontend calendar + upcoming events styles
   Uses Bootstrap 5 variables where possible.
   ACS brand colors: primary red #8b0000 / #ba0000
   ============================================================ */

/* ----------------------------------------------------------
   Upcoming events section (home page 4-box grid)
   ---------------------------------------------------------- */

.acsdoc-upcoming-section {
	background: #f0f2f5;
	padding: 3rem 0;
}

.acsdoc-upcoming-section h2,
.acsdoc-upcoming-section .acsdoc-section-title {
	text-align: center;
	color: #2c3e50;
	font-size: 2rem;
	font-weight: 400;
	margin-bottom: 2rem;
}

/* Card: equal height, clean bordered box matching screenshot */
.acsdoc-event-card {
	border: 1px solid #ccd0d5;
	border-radius: 4px;
	padding: 1.25rem 1rem 1rem;
	background: #fff;
	display: flex;
	flex-direction: column;
}

/* Clickable card variant used on home page */
.acsdoc-upcoming-card {
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.acsdoc-upcoming-card:hover,
.acsdoc-upcoming-card:focus {
	border-color: #8b0000;
	box-shadow: 0 2px 8px rgba(139,0,0,0.15);
	outline: 2px solid #8b0000;
	outline-offset: 1px;
}

.acsdoc-event-date {
	color: #8b0000;
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	margin-bottom: 0.5rem;
	line-height: 1.3;
}

/* Larger, centered date on the home-page upcoming cards */
.acsdoc-event-date--card {
	font-size: 1.1rem;
	text-align: center;
	margin-bottom: 0.75rem;
}

.acsdoc-event-title {
	color: #222;
	font-size: 0.95rem;
	line-height: 1.4;
	flex-grow: 1;
}

.acsdoc-event-title a {
	color: #222;
	text-decoration: none;
}
.acsdoc-event-title a:hover,
.acsdoc-event-title a:focus {
	color: #8b0000;
	text-decoration: underline;
}

.acsdoc-event-desc {
	font-size: 0.85rem;
	color: #555;
	margin-top: 0.5rem;
}

/* "VIEW FULL CALENDAR" button */
.acsdoc-cal-btn {
	background-color: #8b0000;
	border-color: #8b0000;
	color: #fff;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 0.6rem 2rem;
	border-radius: 2px;
}
.acsdoc-cal-btn:hover,
.acsdoc-cal-btn:focus {
	background-color: #6b0000;
	border-color: #6b0000;
	color: #fff;
}

.acsdoc-no-events {
	text-align: center;
	color: #666;
	padding: 2rem 0;
}

/* iCal subscription link above calendar */
.acsdoc-cal-ical-row {
	font-size: 0.85rem;
}
.acsdoc-cal-ical-link {
	color: #8b0000;
	text-decoration: none;
	border: 1px solid #8b0000;
	border-radius: 3px;
	padding: 0.2rem 0.6rem;
	display: inline-block;
}
.acsdoc-cal-ical-link:hover,
.acsdoc-cal-ical-link:focus {
	background: #8b0000;
	color: #fff;
}

/* ----------------------------------------------------------
   Full calendar view
   ---------------------------------------------------------- */

.acsdoc-calendar {
	width: 100%;
	margin: 2rem 0;
	font-family: inherit;
}

/* Header row: prev | MONTH YEAR | next | year-select */
.acsdoc-cal-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.acsdoc-cal-title {
	font-size: 1.5rem;
	font-weight: 500;
	color: #2c3e50;
	margin: 0;
	min-width: 220px;
	text-align: center;
}

.acsdoc-cal-prev,
.acsdoc-cal-next {
	font-size: 1.5rem;
	line-height: 1;
	padding: 0.25rem 0.75rem;
	color: #8b0000;
	border-color: #8b0000;
}
.acsdoc-cal-prev:hover,
.acsdoc-cal-next:hover {
	background: #8b0000;
	color: #fff;
	border-color: #8b0000;
}

/* Calendar table */
.acsdoc-cal-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

/* Day-of-week header row */
.acsdoc-cal-table thead tr {
	background: #8b0000;
	color: #fff;
}
.acsdoc-cal-table thead th {
	padding: 0.5rem 0;
	text-align: center;
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	border: none;
}

/* Individual day cells — padding removed; inner div controls height */
.acsdoc-cal-day {
	padding: 0;
	border: 1px solid #dde1e7;
	background: #fff;
	vertical-align: top;
}

/* Inner wrapper: fixed height clips extra content so all rows stay even */
.acsdoc-cal-day-inner {
	height: 130px;
	overflow: hidden;
	padding: 0.35rem 0.4rem 0.25rem;
}

.acsdoc-cal-empty {
	background: #f8f9fa;
}

.acsdoc-cal-day.today {
	background: #fff8f8;
}

.acsdoc-cal-day-num {
	font-size: 0.8rem;
	font-weight: 600;
	color: #333;
	display: block;
	margin-bottom: 2px;
}

.acsdoc-cal-day.today .acsdoc-cal-day-num {
	color: #fff;
	background: #8b0000;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
}

/* Event pill inside a day cell — single line with ellipsis */
.acsdoc-cal-event {
	display: block;
	background: #8b0000;
	color: #fff;
	font-size: 0.75rem;
	line-height: 1.3;
	padding: 3px 6px;
	border-radius: 3px;
	margin-top: 3px;
	cursor: pointer;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	transition: background 0.15s;
	border: none;
	width: 100%;
	text-align: left;
}
.acsdoc-cal-event:hover,
.acsdoc-cal-event:focus {
	background: #6b0000;
	color: #fff;
	outline: 2px solid #2c3e50;
	outline-offset: 1px;
}

/* Multi-day continuation: slightly lighter shade */
.acsdoc-cal-event.is-continuation {
	background: #c0392b;
}

/* Modal customization */
#acsdocEventModal .modal-header {
	background: #8b0000;
	color: #fff;
}
#acsdocEventModal .modal-title {
	color: #fff;
}
#acsdocEventModal .btn-close {
	filter: invert(1) grayscale(100%) brightness(200%);
}
#acsdocEventModal .acsdoc-modal-dates {
	color: #8b0000;
	font-size: 1rem;
}
#acsdocEventModal .acsdoc-modal-link {
	background-color: #8b0000;
	border-color: #8b0000;
}
#acsdocEventModal .acsdoc-modal-link:hover {
	background-color: #6b0000;
	border-color: #6b0000;
}

/* Responsive: smaller cells on mobile */
@media (max-width: 576px) {
	.acsdoc-cal-day {
		min-height: 60px;
		padding: 0.2rem;
	}
	.acsdoc-cal-event {
		font-size: 0.65rem;
		padding: 2px 3px;
	}
	.acsdoc-cal-title {
		font-size: 1.1rem;
		min-width: 160px;
	}
}
