/* DacDBCal Styles */

/* Month Layout */
.dacdbcal-month-layout {
	margin: 20px 0;
}

.dacdbcal-month {
	margin-bottom: 40px;
}

.dacdbcal-month-title {
	background: linear-gradient(135deg, #c3c4c7 0%, #ccc 100%);
	color: #32373c;
	padding: 15px;
	margin: 0 0 20px 0;
	font-size: 24px;
	font-weight: bold;
}

.dacdbcal-event-card {
	display: flex;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.dacdbcal-event-card:hover {
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.dacdbcal-event-date {
	width: 80px;
	flex-shrink: 0;
	background: #0b2494;
	color: #fff;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 10px;
}

.dacdbcal-event-month {
	font-size: 14px;
	font-weight: bold;
	text-transform: uppercase;
}

.dacdbcal-event-day {
	font-size: 32px;
	font-weight: bold;
	line-height: 1;
	margin-top: 5px;
}

.dacdbcal-event-details {
	flex: 1;
	padding: 10px 15px;
}

.dacdbcal-event-title {
	margin: 0 0 5px 0;
	font-size: 18px;
}

.dacdbcal-event-title a {
	color: #000;
	text-decoration: none;
	transition: color 0.2s;
}

.dacdbcal-event-title a:hover {
	color: #0b2494;
	text-decoration: underline;
}

.dacdbcal-event-meta {
	color: #666;
	font-size: 14px;
	line-height: 1.4;
}

.dacdbcal-event-datetime {
	font-weight: 600;
	margin-bottom: 3px;
}

/* List Layout */
.dacdbcal-list-layout {
	margin: 20px 0;
}

.dacdbcal-event-row {
	display: flex;
	background: #fff;
	border-bottom: 1px solid #ddd;
	overflow: hidden;
	transition: background 0.1s;
}

.dacdbcal-event-row:hover {
	background: #f9f9f9;
}

.dacdbcal-event-marker {
	width: 4px;
	flex-shrink: 0;
	background: #336666;
}

.dacdbcal-event-content {
	flex: 1;
	padding: 4px 10px;
}

.dacdbcal-list-layout .dacdbcal-event-title {
	margin: 0 0 2px 0;
	font-size: 0.9em;
	font-weight: bold;
	line-height: 1.2;
}

.dacdbcal-list-layout .dacdbcal-event-title a {
	color: #000;
	text-decoration: none;
}

.dacdbcal-list-layout .dacdbcal-event-title a:hover {
	color: #336666;
	text-decoration: underline;
}

.dacdbcal-event-datetime-line {
	font-size: 0.8em;
	font-weight: bold;
	color: #666;
	margin-bottom: 2px;
	line-height: 1.3;
}

.dacdbcal-add-to-calendar {
	color: #336666;
	text-decoration: none;
	display: inline-block;
	transition: color 0.2s;
}

.dacdbcal-add-to-calendar:hover {
	color: #254d4d;
}

.dacdbcal-event-location-line {
	font-size: 0.8em;
	font-weight: normal;
	color: #666;
	line-height: 1.3;
}

/* Popup Overlay */
.dacdbcal-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.7);
	z-index: 999999;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

.dacdbcal-popup {
	background: #fff;
	border-radius: 8px;
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.dacdbcal-popup-content {
	padding: 30px;
}

.dacdbcal-popup-content h2 {
	margin: 0 0 20px 0;
	color: #336666;
	border-bottom: 2px solid #336666;
	padding-bottom: 10px;
}

.dacdbcal-popup-info {
	line-height: 1.8;
}

.dacdbcal-popup-row {
	margin-bottom: 12px;
}

.dacdbcal-popup-row strong {
	display: inline-block;
	min-width: 100px;
	color: #333;
}

.dacdbcal-popup-location,
.dacdbcal-popup-description {
	margin-top: 15px;
}

.dacdbcal-popup-location img,
.dacdbcal-popup-description img {
	max-width: 100%;
	height: auto;
	margin: 10px 0;
}

.dacdbcal-popup-location a,
.dacdbcal-popup-description a {
	color: #336666;
	text-decoration: underline;
}

.dacdbcal-popup-link {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 20px;
	background: #336666;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.2s;
}

.dacdbcal-popup-link:hover {
	background: #254d4d;
}

.dacdbcal-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 32px;
	height: 32px;
	background: #f0f0f0;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	color: #333;
	transition: background 0.2s;
}

.dacdbcal-popup-close:hover {
	background: #ddd;
}

/* Error */
.dacdbcal-error {
	padding: 20px;
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
}

/* Calendar Month Layout */
.dacdbcal-calmonth-layout {
	margin: 20px 0;
}

.dacdbcal-calmonth-header {
	background: #0b2494;
	padding: 15px;
	border-radius: 4px 4px 0 0;
}

.dacdbcal-calmonth-nav {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
}

.dacdbcal-calmonth-selector {
	padding: 10px 15px;
	font-size: 16px;
	border: 2px solid #082078;
	border-radius: 4px;
	min-width: 250px;
	background: #fff;
	cursor: pointer;
}

.dacdbcal-calmonth-selector:focus {
	outline: none;
	border-color: #05165a;
}

.dacdbcal-calendar-grid {
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
}

.dacdbcal-calendar-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: #0b2494;
	border-bottom: 2px solid #082078;
}

.dacdbcal-calendar-day-name {
	padding: 10px;
	text-align: center;
	font-weight: bold;
	font-size: 12px;
	color: #fff;
	text-transform: uppercase;
}

.dacdbcal-calendar-body {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.dacdbcal-calendar-cell {
	min-height: 100px;
	border: 1px solid #e0e0e0;
	padding: 5px;
	overflow: hidden;
}

/* Alternating column backgrounds */
.dacdbcal-calendar-cell:nth-child(7n+1),
.dacdbcal-calendar-cell:nth-child(7n+3),
.dacdbcal-calendar-cell:nth-child(7n+5),
.dacdbcal-calendar-cell:nth-child(7n+7) {
	background: #fff;
}

.dacdbcal-calendar-cell:nth-child(7n+2),
.dacdbcal-calendar-cell:nth-child(7n+4),
.dacdbcal-calendar-cell:nth-child(7n+6) {
	background: #f5f5f5;
}

.dacdbcal-calendar-empty {
	background: #f9f9f9;
}

.dacdbcal-calendar-today {
	background: #fffbdd !important;
}

.dacdbcal-calendar-date {
	font-weight: bold;
	font-size: 14px;
	color: #000;
	margin-bottom: 5px;
}

.dacdbcal-calendar-today .dacdbcal-calendar-date {
	color: #0b2494;
}

.dacdbcal-calendar-events {
	font-size: 11px;
}

.dacdbcal-calendar-event {
	margin-bottom: 3px;
	line-height: 1.3;
}

.dacdbcal-calendar-event a {
	color: #000;
	text-decoration: none;
	display: block;
	padding: 2px 4px;
	border-radius: 2px;
	background: #e8e8e8;
	transition: background 0.2s;
}

.dacdbcal-calendar-event a:hover {
	background: #d0d0d0;
}

.dacdbcal-calendar-event-time {
	font-weight: 600;
}

.dacdbcal-calendar-event-title {
	display: inline;
}

/* Responsive */
@media (max-width: 768px) {
	.dacdbcal-event-card {
		flex-direction: column;
	}

	.dacdbcal-event-date {
		width: 100%;
		flex-direction: row;
		justify-content: flex-start;
		padding: 10px 15px;
	}

	.dacdbcal-event-month {
		margin-right: 10px;
	}

	.dacdbcal-event-day {
		font-size: 24px;
		margin-top: 0;
	}

	.dacdbcal-popup {
		max-width: 100%;
		margin: 0;
		border-radius: 0;
	}

	.dacdbcal-popup-content {
		padding: 20px;
	}
}
