/**
 * Eventive Plugin - Shared Global Styles
 * Styles used across multiple blocks or by external Eventive widgets
 */

/* ==========================================================================
   SHARED LAYOUT CONTAINERS
   ========================================================================== */

#eventive-login-container {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}

/* ==========================================================================
   EVENTIVE WIDGET OVERRIDES
   ========================================================================== */

.Eventive--LoginWidget--LoginDescription {
	color: #fff;
}

/* ==========================================================================
   UNIFIED MODAL SYSTEM
   Used in: calendar, events-week, account-passes, account-tickets, login
   ========================================================================== */

.eventive-modal-overlay {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background-color: rgba(0, 0, 0, 0.5);
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	padding: 20px;
	transition: background-color 0.3s ease;
}

.eventive-modal-overlay--dark {
	background-color: rgba(0, 0, 0, 0.85);
}

.eventive-modal-panel {
	position: relative;
	background: #fff;
	width: 90%;
	max-width: 800px;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	color: var(--text-color, #333);
	font-family: var(--font-family-base);
}

.eventive-modal-panel--small {
	max-width: 560px;
}

.eventive-modal-close-btn {
	position: absolute;
	top: 10px;
	right: 12px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	background: none;
	border: none;
	cursor: pointer;
	color: #333;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.2s ease, color 0.2s ease;
}

.eventive-modal-close-btn:hover,
.eventive-modal-close-btn:focus {
	background: #f0f0f0;
	color: #000;
}

.eventive-modal-panel h2 {
	margin-top: 0;
	color: var(--heading-color, #333);
}

.eventive-modal-panel p {
	margin: 10px 0;
	color: var(--text-color, #555);
}

/* ==========================================================================
   SHARED CARD SYSTEM
   Used in: film-guide, events, events-list
   ========================================================================== */

.eventive-card {
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--border-color, #e0e0e0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.3s ease;
}

.eventive-card:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.eventive-card-image {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.eventive-card-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 15px;
	color: var(--text-color, #333);
	line-height: 1.5;
}

.eventive-card-title {
	font-size: 1.2em;
	font-weight: 700;
	margin: 0;
	color: var(--heading-color, #111);
}

.eventive-card-meta {
	font-size: 0.9em;
	color: #666;
	margin: 0;
}

.eventive-card-description {
	font-size: 0.9em;
	color: var(--text-color, #555);
	line-height: 1.6;
	margin: 0;
}

.eventive-card-link a {
	display: inline-block;
	margin-top: 8px;
	color: var(--link-color, #0073aa);
	text-decoration: none;
	font-weight: 700;
	transition: color 0.2s;
}

.eventive-card-link a:hover {
	color: var(--link-hover-color, #005177);
	text-decoration: underline;
}

/* Horizontal card variant (used in list views) */
.eventive-card--horizontal {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
}

.eventive-card--horizontal .eventive-card-image {
	width: 180px;
	min-width: 180px;
	height: auto;
	object-fit: cover;
}

.eventive-card--horizontal .eventive-card-content {
	flex: 1;
}

@media (max-width: 600px) {
	.eventive-card--horizontal {
		flex-direction: column;
	}

	.eventive-card--horizontal .eventive-card-image {
		width: 100%;
		min-width: unset;
	}
}

/* ==========================================================================
   EVENTIVE CHECKOUT TABLE WIDGET
   ========================================================================== */

.Eventive--OrderQuantitySelect table {
	background-color: #fff !important;
	width: 100% !important;
	border-collapse: collapse !important;
	border-spacing: 0 !important;
	table-layout: fixed !important;
	font-family: Lato, sans-serif !important;
	font-size: 1em;
	color: rgb(33, 33, 33) !important;
	border-color: transparent !important;
}

.Eventive--OrderQuantitySelect thead {
	border-bottom: none !important;
}

.Eventive--OrderQuantitySelect thead tr {
	border-bottom: none !important;
}

.Eventive--OrderQuantitySelect tbody tr {
	border-bottom: 1px solid rgb(224, 224, 224) !important;
}

.Eventive--OrderQuantitySelect th,
.Eventive--OrderQuantitySelect td {
	padding: 8px;
	text-align: left;
	word-wrap: break-word;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 768px) {

	.eventive-modal-panel {
		width: 95%;
	}
}

/* ==========================================================================
   TAG BUTTONS & FILTER STYLES
   Used in: film-guide, events-list, tags, and other filterable blocks
   ========================================================================== */

.eventive-tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.eventive-tag-btn {
	padding: 8px 16px;
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.2s ease;
}

.eventive-tag-btn:hover {
	filter: brightness(0.85);
}

.eventive-tag-btn.active {
	border: 2px solid var(--border-color, #ddd);
}

/* ==========================================================================
   TAG PILLS (display tags on film / event cards)
   Used in: film-details, film-guide, calendar, single-film, events-list
   ========================================================================== */

.eventive-tag-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.eventive-tag-pill {
	display: inline-block;
	padding: 5px 10px;
	border: none;
	border-radius: 4px;
	font-size: 0.8em;
	font-weight: 600;
	text-align: center;
	cursor: default;
	transition: background-color 0.2s ease;
}

.eventive-tag-pill:hover {
	filter: brightness(0.85);
}

/* Venue Badge */
.eventive-venue-tag {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 4px;
	font-weight: 600;
}

/* Filter Container */
.event-filter-container,
.eventive-events-tags-filter,
.eventive-film-guide-tags-filter {
	padding: 15px;
	background: var(--background-color-muted, #f9f9f9);
	border-radius: 8px;
	border: 1px solid var(--border-color, #ddd);
	margin-bottom: 1.5rem;
	width: 100%;
}

.event-filter-container .filter-title,
.eventive-events-tags-filter .filter-title,
.eventive-film-guide-tags-filter .filter-title {
	font-weight: 600;
	margin-bottom: 10px;
}

/* ==========================================================================
   SHARED EVENTIVE BUTTON
   Used in: events, events-week, film-details, film-showtimes, native-year-round
   ========================================================================== */

.eventive-button {
	display: block;
	margin: 10px auto;
	color: var(--button-text, #fff);
	border: none;
	font-weight: 600;
}

/* ==========================================================================
   SHARED SECTION BOX
   Muted background container for grouping content (date groups, nav bars, etc.)
   Used in: events, events-list, events-week, film-showtimes, native-year-round
   ========================================================================== */

.eventive-section-box,
.eventive-notice,
.wp-block-eventive-events .event-group,
.wp-block-eventive-events-list .event-group,
.wp-block-eventive-native-year-round .yr-no-events,
.wp-block-eventive-native-year-round .event-day-group,
.wp-block-eventive-events-week .weekly-calendar-controls,
.wp-block-eventive-native-year-round .weekly-calendar-container,
.wp-block-eventive-native-year-round .eventive-calendar-buttons,
.wp-block-eventive-film-showtimes .eventive-showtime-date-group,
.wp-block-eventive-film-details .film-events .event-item,
.wp-block-eventive-film-details .film-events .event-box,
.wp-block-eventive-film-details #film-details-container,
.wp-block-eventive-film-details .eventive-film-details,
.wp-block-eventive-film-details .film-events {
	background-color: var(--background-color-muted, #f9f9f9);
	border: 1px solid var(--border-color, #ddd);
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	padding: 16px;
}

/* ==========================================================================
   SHARED ITEM BOX
   White interactive card for individual items (tickets, passes, venues, etc.)
   Used in: account-passes, account-tickets, events-list, film-details,
            native-year-round, venues
   ========================================================================== */

.eventive-item-box,
.wp-block-eventive-account-passes .eventive-pass-card,
.wp-block-eventive-account-tickets .eventive-ticket-card,
.wp-block-eventive-venues .eventive-venue-card,
.wp-block-eventive-events-list .event-list-item,
.wp-block-eventive-events-list .event-item,
.wp-block-eventive-native-year-round .event-item,
.wp-block-eventive-native-year-round .yr-card,
.wp-block-eventive-film-details {
	background: var(--card-bg, #fff);
	border: 1px solid var(--border-color, #ddd);
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	padding: 16px;
}

/* ==========================================================================
   SHARED NOTICE STYLES
   Used in: account, account-details, account-passes, account-tickets
   ========================================================================== */

.eventive-notice {
	background: #f8fafc;
	border: 1px solid var(--border-color, #ddd);
	color: var(--text-color, #333);
	padding: 12px 16px;
	border-radius: 8px;
	text-align: center;
}

.eventive-notice p {
	margin: 0;
}

/* ==========================================================================
   SHARED LOGIN CONTAINER (class-based)
   Used in: account-details, account-passes, account-tickets
   ========================================================================== */

.eventive-login-container {
	min-height: 100px;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* ==========================================================================
   SHARED SPINNER / LOADER
   Used in: account-details, account-passes, account-tickets
   ========================================================================== */

.loader {
	border: 4px solid #f3f3f3;
	border-top: 4px solid var(--primary-color, #0073aa);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	animation: spin 1s linear infinite;
}

@keyframes spin {

	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   SHARED LOADING & ERROR STATES
   Used in: account, film-meta, film-showtimes
   ========================================================================== */

.eventive-loading,
.eventive-no-showtimes {
	text-align: center;
	padding: 1.5em;
	font-style: italic;
	border-radius: 4px;
	background-color: #f5f5f5;
}

.eventive-error {
	text-align: center;
	padding: 1.5em;
	font-style: italic;
	color: #c00;
	border-radius: 4px;
	background-color: #fee;
}

/* ==========================================================================
   SHARED EMPTY / ERROR / LOADING MESSAGES
   Used in: events, events-list, events-week, film-details
   ========================================================================== */

.no-events,
.error-message,
.loading-message {
	text-align: center;
	padding: 20px;
	color: #666;
	font-style: italic;
}
