/*
 * DS Events Calendar — Frontend Stylesheet
 * =========================================
 * CSS custom properties (--dse-accent, --dse-btn-text) are injected inline by
 * the shortcode so the admin-configurable colours cascade through here
 * automatically.  The defaults below are only a fallback.
 *
 * @package DS_Events_Calendar
 */

/* ── Custom property defaults ─────────────────────────────────────────────── */
:root {
	--dse-accent:   #FFD600;
	--dse-btn-text: #000000;
}

/* ── Outer wrapper ────────────────────────────────────────────────────────── */
.dse-widget {
	box-sizing:   border-box;
	font-family:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size:    15px;
	line-height:  1.5;
	color:        #1a1a2e;
	padding:      20px;
	background:   #f7f8fc;
	border:       1px solid #e4e6ef;
	border-radius: 16px;
	max-width:    100%;
}

/* ── Card grid ────────────────────────────────────────────────────────────── */
.dse-grid {
	display:               grid;
	grid-template-columns: repeat( 2, 1fr );
	gap:                   20px;
}

@media ( max-width: 580px ) {
	.dse-grid {
		grid-template-columns: 1fr;
	}
}

/* ── Individual card ─────────────────────────────────────────────────────── */
.dse-card {
	background:    #ffffff;
	border-radius: 12px;
	overflow:      hidden;
	box-shadow:    0 2px 12px rgba( 0, 0, 0, 0.08 );
	display:       flex;
	flex-direction: column;
	transition:    transform 0.18s ease, box-shadow 0.18s ease;
}

.dse-card:hover {
	transform:  translateY( -3px );
	box-shadow: 0 6px 24px rgba( 0, 0, 0, 0.13 );
}

/* ── Card image block ────────────────────────────────────────────────────── */
.dse-card-image {
	position:       relative;
	width:          100%;
	padding-bottom: 62%;   /* 16:10 aspect ratio */
	overflow:       hidden;
	background:     #dde1ec;
	flex-shrink:    0;
}

.dse-card-image img {
	position:   absolute;
	inset:      0;
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
	transition: transform 0.3s ease;
}

.dse-card:hover .dse-card-image img {
	transform: scale( 1.04 );
}

/* ── Placeholder when no image set ───────────────────────────────────────── */
.dse-card-image-placeholder {
	position:        absolute;
	inset:           0;
	display:         flex;
	align-items:     center;
	justify-content: center;
	background:      linear-gradient( 135deg, #1a1a2e 0%, #16213e 100% );
}

.dse-card-image-placeholder svg {
	width:   52px;
	height:  52px;
	opacity: 0.35;
	fill:    #ffffff;
}

/* ── Date badge ───────────────────────────────────────────────────────────── */
.dse-date-badge {
	position:      absolute;
	top:           10px;
	left:          10px;
	background:    rgba( 15, 15, 25, 0.72 );
	backdrop-filter: blur( 4px );
	-webkit-backdrop-filter: blur( 4px );
	border-radius: 8px;
	padding:       6px 10px 8px;
	display:       flex;
	flex-direction: column;
	align-items:   center;
	min-width:     42px;
	line-height:   1;
	user-select:   none;
}

.dse-date-month {
	display:     block;
	font-size:   10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color:       var( --dse-accent );
}

.dse-date-day {
	display:     block;
	font-size:   26px;
	font-weight: 800;
	color:       var( --dse-accent );
	line-height: 1;
	margin-top:  1px;
}

/* ── Card body ───────────────────────────────────────────────────────────── */
.dse-card-body {
	padding:        14px 16px 18px;
	display:        flex;
	flex-direction: column;
	gap:            10px;
	flex:           1;
}

/* ── Event title ─────────────────────────────────────────────────────────── */
.dse-card-title {
	margin:      0;
	font-size:   16px;
	font-weight: 700;
	line-height: 1.3;
	color:       #111827;
	/* Clamp to 2 lines to keep all cards the same height in a row. */
	display:            -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow:           hidden;
}

/* ── Time row ────────────────────────────────────────────────────────────── */
.dse-card-time {
	display:     flex;
	align-items: center;
	gap:         6px;
	font-size:   13px;
	color:       #6b7280;
	flex-shrink: 0;
}

.dse-card-time svg {
	width:    14px;
	height:   14px;
	fill:     none;
	stroke:   #6b7280;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

/* ── Location row ────────────────────────────────────────────────────────── */
.dse-card-location {
	display:     flex;
	align-items: center;
	gap:         6px;
	font-size:   13px;
	color:       #6b7280;
	flex-shrink: 0;
}

.dse-card-location svg {
	width:    14px;
	height:   14px;
	fill:     none;
	stroke:   #6b7280;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

/* ── Spacer to push button to bottom ─────────────────────────────────────── */
.dse-card-spacer {
	flex: 1;
}

/* ── GET TICKETS button ───────────────────────────────────────────────────── */
.dse-btn {
	display:         block;
	width:           100%;
	box-sizing:      border-box;
	padding:         11px 16px;
	background:      var( --dse-accent );
	color:           var( --dse-btn-text );
	font-size:       13px;
	font-weight:     800;
	letter-spacing:  0.1em;
	text-transform:  uppercase;
	text-align:      center;
	text-decoration: none;
	border:          none;
	border-radius:   8px;
	cursor:          pointer;
	transition:      filter 0.15s ease, transform 0.12s ease;
	line-height:     1;
	flex-shrink:     0;
}

.dse-btn:hover {
	filter:    brightness( 0.9 );
	transform: translateY( -1px );
	color:     var( --dse-btn-text );
	text-decoration: none;
}

.dse-btn:active {
	transform: translateY( 0 );
	filter:    brightness( 0.82 );
}

/* ── Empty-state notice ───────────────────────────────────────────────────── */
.dse-no-events {
	margin:     0;
	padding:    40px 24px;
	text-align: center;
	color:      #9ca3af;
	font-size:  15px;
}
