/**
 * EventLive Widgets Embed - Frontend Styles
 * 
 * Styles for all widget types
 *
 * @package EventLive_Widgets_Embed
 * @since 1.0.0
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.elw-widget {
	margin: 1em 0;
	box-sizing: border-box;
}

.elw-widget * {
	box-sizing: border-box;
}

.elwe-error {
	color: #d63638;
	padding: 1em;
	background: #fcf0f1;
	border-left: 4px solid #d63638;
}

/* ==========================================================================
   Button Widget
   ========================================================================== */

.elw-widget-button {
	text-align: center;
}

.elw-button-content {
	display: inline-block;
	text-align: left;
	max-width: 100%;
}

.elw-widget-button .elw-event-name {
	margin: 0 0 0.5em;
	font-size: 1.2em;
	font-weight: 600;
}

.elw-widget-button .elw-event-meta {
	margin-bottom: 1em;
	font-size: 0.9em;
	color: #666;
}

.elw-widget-button .elw-event-date,
.elw-widget-button .elw-event-time {
	display: inline-block;
	margin-right: 1em;
}

.elw-button {
	display: inline-block;
	padding: 12px 24px;
	text-decoration: none;
	font-weight: 600;
	border-radius: 4px;
	transition: opacity 0.2s, transform 0.2s;
	cursor: pointer;
}

.elw-button:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.elw-button:active {
	transform: translateY(0);
}

/* ==========================================================================
   Banner Widget
   ========================================================================== */

.elw-widget-banner {
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	position: relative;
}

.elw-widget-banner.elw-banner-has-image {
	min-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.elw-banner-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.85) 0%,
		rgba(255, 255, 255, 0.75) 50%,
		rgba(255, 255, 255, 0.85) 100%
	);
	z-index: 1;
}

.elw-banner-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: #f0f0f0;
}

.elw-banner-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.elw-banner-content {
	padding: 2em;
	position: relative;
	z-index: 2;
	width: 100%;
}

.elw-widget-banner .elw-event-name {
	margin: 0 0 0.5em;
	font-size: 1.5em;
	font-weight: 700;
	color: #1a1a1a;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.elw-widget-banner.elw-banner-has-image .elw-event-name {
	color: #1a1a1a;
	text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9);
}

.elw-widget-banner .elw-event-date {
	margin-bottom: 1em;
	font-size: 1em;
	color: #444;
	font-weight: 500;
}

.elw-widget-banner.elw-banner-has-image .elw-event-date {
	color: #333;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.elw-widget-banner .elw-event-description {
	margin-bottom: 1.5em;
	line-height: 1.6;
	color: #555;
}

.elw-widget-banner.elw-banner-has-image .elw-event-description {
	color: #444;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.elw-button-primary {
	display: inline-block;
	padding: 12px 24px;
	background: #0073aa;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	transition: background 0.2s;
}

.elw-button-primary:hover {
	background: #005a87;
}

/* Theme Variations */
.elw-theme-light {
	background: #fff;
	color: #333;
}

.elw-theme-dark {
	background: #1e1e1e;
	color: #fff;
}

.elw-theme-dark .elw-event-name,
.elw-theme-dark .elw-event-date,
.elw-theme-dark .elw-event-description {
	color: #fff;
}

.elw-theme-dark .elw-event-date {
	color: #ccc;
}

/* ==========================================================================
   Full Widget (Iframe)
   ========================================================================== */

.elw-widget-full {
	width: 100%;
	max-width: 100%;
}

.elw-iframe-container {
	position: relative;
	width: 100%;
	min-height: 400px;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	background: #f9f9f9;
}

.elw-iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.elw-iframe-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 400px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	position: relative;
	overflow: hidden;
}

.elw-iframe-placeholder::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.2);
	z-index: 1;
}

.elw-iframe-placeholder-content {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 2em;
	color: #fff;
	max-width: 500px;
}

.elw-iframe-placeholder-content h3 {
	margin: 0 0 1em;
	font-size: 1.5em;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.elw-iframe-note {
	margin: 1em 0 0;
	font-size: 0.9em;
	opacity: 0.9;
	color: #fff;
}

.elw-load-iframe {
	padding: 16px 32px;
	background: #fff;
	color: #667eea;
	border: 0;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.elw-load-iframe:hover {
	background: #f0f0f0;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.elw-load-iframe:active {
	transform: translateY(0);
}

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

@media (min-width: 768px) {
	.elw-widget-banner:not(.elw-banner-has-image) {
		flex-direction: row;
	}
	
	.elw-widget-banner.elw-banner-has-image {
		min-height: 450px;
	}
	
	.elw-banner-image {
		width: 40%;
		height: auto;
		min-height: 300px;
	}
	
	.elw-banner-content {
		width: 60%;
		padding: 2em;
	}
	
	.elw-widget-banner.elw-banner-has-image .elw-banner-content {
		width: 100%;
		max-width: 800px;
		margin: 0 auto;
	}
}

@media (max-width: 767px) {
	.elw-widget-button {
		text-align: center;
	}
	
	.elw-button-content {
		text-align: center;
	}
	
	.elw-banner-image {
		height: 180px;
	}
	
	.elw-banner-content {
		padding: 1em;
	}
	
	.elw-widget-banner .elw-event-name {
		font-size: 1.2em;
	}
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.elw-button:focus,
.elw-load-iframe:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.elw-iframe[title] {
	/* Ensure iframe has accessible title */
}

/* Screen reader only */
.elw-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* ==========================================================================
   RTL Support
   ========================================================================== */

[dir="rtl"] .elw-widget-button {
	text-align: right;
}

[dir="rtl"] .elw-event-date,
[dir="rtl"] .elw-event-time {
	margin-right: 0;
	margin-left: 1em;
}


