/**
 * Calendar Grid Widget Styles
 *
 * @package SuperEventsCalendar
 * @since   1.3.0
 */

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.sec-cal-grid {
	display: grid;
	gap: 20px;
}

.sec-cal-grid--1col {
	grid-template-columns: 1fr;
}

.sec-cal-grid--2col {
	grid-template-columns: repeat(2, 1fr);
}

.sec-cal-grid--3col {
	grid-template-columns: repeat(3, 1fr);
}

.sec-cal-grid--4col {
	grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   Card Base
   ========================================================================== */

.sec-cal-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.sec-cal-card--featured {
	grid-column: span 2 !important;
}

.sec-cal-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sec-cal-template-item {
	display: block;
	min-width: 0;
	width: 100%;
}

.sec-cal-grid--template > * {
	min-width: 0;
}

.sec-cal-template-item > * {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
}

.sec-cal-grid--template > .sec-cal-template-item--featured-span-2 {
	grid-column: span 2 !important;
}

/* Modal mode: whole card is clickable */
.sec-cal-grid--modal .sec-cal-card {
	cursor: pointer;
}

/* ==========================================================================
   Card Styles (horizontal / vertical)
   ========================================================================== */

.sec-cal-grid--horizontal .sec-cal-card {
	display: flex;
	flex-direction: column;
}

.sec-cal-grid--horizontal .sec-cal-card > .sec-cal-content {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 16px;
}

.sec-cal-grid--vertical .sec-cal-card {
	display: flex;
	flex-direction: column;
}

/* ==========================================================================
   Content
   ========================================================================== */

.sec-cal-content {
	flex: 1;
	min-width: 0;
}

/* ==========================================================================
   Date Styles
   ========================================================================== */

/* Inline */
.sec-cal-date--inline .sec-cal-date__inline {
	font-weight: 600;
	color: #333;
}

/* Card */
.sec-cal-date--card {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 70px;
	width: fit-content;
	background: #f0f4ff;
	padding: 10px 14px;
	border-radius: 8px;
	text-align: center;
	flex-shrink: 0;
}

.sec-cal-date--card .sec-cal-date__day-name {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
	line-height: 1.2;
}

.sec-cal-date--card .sec-cal-date__day-number {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
}

.sec-cal-date--card .sec-cal-date__month {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
	line-height: 1.2;
}

/* Badge */
.sec-cal-date--badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	background: #f0f4ff;
	padding: 8px 6px;
	border-radius: 6px;
	text-align: center;
	flex-shrink: 0;
}

.sec-cal-date--badge .sec-cal-date__month {
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
	line-height: 1.2;
}

.sec-cal-date--badge .sec-cal-date__day-number {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

/* ==========================================================================
   Title
   ========================================================================== */

.sec-cal-title {
	margin: 4px 0 8px;
	font-size: 1.125rem;
	line-height: 1.4;
}

.sec-cal-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.sec-cal-title a:hover {
	color: #0073aa;
}

/* ==========================================================================
   Meta Items (time, venue, category, format, organizer)
   ========================================================================== */

.sec-cal-time,
.sec-cal-venue,
.sec-cal-category,
.sec-cal-format,
.sec-cal-organizer {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 0.875rem;
	color: #666;
	margin-bottom: 4px;
	line-height: 1.5;
}

.sec-cal-meta-icon {
	flex-shrink: 0;
}

/* ==========================================================================
   Price
   ========================================================================== */

.sec-cal-price {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 600;
	background: #f0f4ff;
	color: #333;
	padding: 2px 10px;
	border-radius: 12px;
	margin-top: 6px;
}

/* ==========================================================================
   Excerpt
   ========================================================================== */

.sec-cal-excerpt {
	font-size: 0.875rem;
	color: #666;
	margin-top: 8px;
	line-height: 1.6;
}

/* ==========================================================================
   Image
   ========================================================================== */

/* Image — always full width at top of card */
.sec-cal-image {
	width: 100%;
}

.sec-cal-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Inner content gets padding (image sits outside) */
.sec-cal-content {
	padding: 20px;
}

.sec-cal-date {
	padding: 12px 20px 0;
	align-self: flex-start;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.sec-cal-empty {
	display: grid;
	gap: 12px;
	justify-items: center;
	padding: 32px 24px;
	border: 1px dashed #d0d7de;
	border-radius: 12px;
	background: #f8fafc;
	text-align: center;
}

.sec-cal-empty__message {
	margin: 0;
	color: #4b5563;
	line-height: 1.6;
}

.sec-cal-empty__actions {
	display: flex;
	width: 100%;
	box-sizing: border-box;
}

.sec-cal-empty__button {
	display: inline-block;
	border: 0 solid transparent;
	padding: 0.75em 1.2em;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.sec-cal-empty__button:hover,
.sec-cal-empty__button:focus {
	text-decoration: none;
}

.sec-cal-empty-align-left .sec-cal-empty {
	justify-items: start;
	text-align: left;
}

.sec-cal-empty-align-center .sec-cal-empty {
	justify-items: center;
	text-align: center;
}

.sec-cal-empty-align-right .sec-cal-empty {
	justify-items: end;
	text-align: right;
}

.sec-cal-empty-button-align-left .sec-cal-empty__actions {
	justify-content: flex-start;
}

.sec-cal-empty-button-align-center .sec-cal-empty__actions {
	justify-content: center;
}

.sec-cal-empty-button-align-right .sec-cal-empty__actions {
	justify-content: flex-end;
}

/* ==========================================================================
   "More Events" button (bottom of grid)
   ========================================================================== */

.sec-cal-more {
	display: flex;
	width: 100%;
	box-sizing: border-box;
	justify-content: center;
}

.sec-cal-more__button {
	display: inline-block;
	appearance: none;
	border: 0 solid transparent;
	padding: 0.75em 1.4em;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	font: inherit;
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sec-cal-more__button:hover,
.sec-cal-more__button:focus {
	text-decoration: none;
}

.sec-cal-more__button[disabled],
.sec-cal-more__button.is-loading {
	cursor: progress;
	opacity: 0.75;
	pointer-events: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ==========================================================================
   Modal
   ========================================================================== */

.sec-cal-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sec-cal-modal {
	background: #fff;
	border-radius: 12px;
	max-width: 800px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sec-cal-modal-close {
	position: sticky;
	top: 0;
	float: right;
	background: #fff;
	border: none;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	padding: 12px 16px;
	color: #666;
	z-index: 1;
	border-radius: 0 12px 0 8px;
}

.sec-cal-modal-close:hover {
	color: #000;
}

.sec-cal-modal-body {
	padding: 24px 32px 32px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
	.sec-cal-grid--2col,
	.sec-cal-grid--3col,
	.sec-cal-grid--4col {
		grid-template-columns: 1fr;
	}

	.sec-cal-card--featured {
		grid-column: auto !important;
	}

	.sec-cal-grid--template > .sec-cal-template-item--featured-span-2 {
		grid-column: auto !important;
	}

	.sec-cal-grid--horizontal .sec-cal-card {
		flex-direction: column;
	}
}
