/**
 * TrailBlaze Events Calendar Public CSS - Theme Inherited
 *
 * @package TrailBlaze_Events_Calendar
 * @since 1.0.0
 */

/* ==========================================================================
   Calendar Wrapper
   ========================================================================== */

.tec-fullcalendar-wrapper {
	margin: 20px 0;
}

/* Header Section */
.tec-events-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.tec-events-title {
	margin: 0;
	font-size: 1.8em;
	font-weight: 600;
}

.tec-events-meta {
	font-size: 0.9em;
	opacity: 0.7;
}

.tec-events-count {
	padding: 4px 12px;
	border-radius: 12px;
	font-weight: 500;
	border: 2px solid currentColor;
}

/* ==========================================================================
   Calendar Container
   ========================================================================== */

.tec-fullcalendar {
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

/* FullCalendar Customizations */
.tec-fullcalendar .fc-header-toolbar {
	padding: 15px 20px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tec-fullcalendar .fc-toolbar-title {
	font-size: 1.5em;
	font-weight: 700;
}

.tec-fullcalendar .fc-button-primary {
	border: 2px solid currentColor;
	border-radius: 6px;
	padding: 8px 16px;
	font-weight: 600;
	transition: all 0.2s ease;
}

.tec-fullcalendar .fc-button-primary:hover {
	opacity: 0.8;
	transform: translateY(-1px);
}

.tec-fullcalendar .fc-button-primary:disabled {
	opacity: 0.5;
}

.tec-fullcalendar .fc-daygrid-day {
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.tec-fullcalendar .fc-daygrid-day-top {
	padding: 8px;
	font-weight: 600;
}

.tec-fullcalendar .fc-daygrid-day.fc-day-today {
	border: 2px solid currentColor;
	font-weight: 700;
}

.tec-fullcalendar .fc-event {
	border: none;
	border-radius: 4px;
	padding: 2px 6px;
	margin: 1px 2px;
	font-size: 0.85em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	opacity: 0.9;
}

.tec-fullcalendar .fc-event:hover {
	opacity: 1;
	transform: scale(1.02);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tec-fullcalendar .fc-event-title {
	font-weight: inherit;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Multi-day event styling */
.tec-fullcalendar .fc-event.fc-event-past,
.tec-fullcalendar .fc-event.fc-event-future {
	position: relative;
}

.tec-fullcalendar .fc-event.fc-event-start {
	border-top-right-radius: 2px;
	border-bottom-right-radius: 2px;
}

.tec-fullcalendar .fc-event.fc-event-end {
	border-top-left-radius: 2px;
	border-bottom-left-radius: 2px;
}

.tec-fullcalendar .fc-event.fc-event-start:not(.fc-event-end) {
	border-right: 2px dotted rgba(255, 255, 255, 0.7);
}

.tec-fullcalendar .fc-event.fc-event-end:not(.fc-event-start) {
	border-left: 2px dotted rgba(255, 255, 255, 0.7);
}

/* Multi-day event continuation indicator */
.tec-fullcalendar .fc-event.fc-event-start:not(.fc-event-end):after {
	content: "→";
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	font-weight: bold;
	opacity: 0.8;
}

.tec-fullcalendar .fc-event.fc-event-end:not(.fc-event-start):before {
	content: "←";
	position: absolute;
	left: 4px;
	top: 50%;
	transform: translateY(-50%);
	font-weight: bold;
	opacity: 0.8;
}

/* Multi-day events use standard styling */
.tec-fullcalendar .fc-event-multi-day {
	/* Inherit standard event styling, no special background */
}

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

.tec-calendar-empty {
	text-align: center;
	padding: 60px 20px;
	opacity: 0.8;
}

.tec-empty-icon {
	font-size: 3em;
	margin-bottom: 20px;
	display: block;
}

.tec-empty-title {
	font-size: 1.4em;
	font-weight: 600;
	margin: 0 0 10px;
}

.tec-empty-description {
	font-size: 1em;
	margin: 0;
	opacity: 0.7;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.tec-calendar-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	gap: 15px;
}

.tec-loading-spinner {
	width: 24px;
	height: 24px;
	border: 3px solid rgba(0, 0, 0, 0.1);
	border-top: 3px solid currentColor;
	border-radius: 50%;
	animation: tec-spin 1s linear infinite;
}

@keyframes tec-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.tec-loading-text {
	font-weight: 500;
	opacity: 0.8;
}

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

.tec-event-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.tec-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.tec-modal-content {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Modal Header */
.tec-modal-header {
	padding: 20px 25px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.tec-modal-header-content {
	flex: 1;
	padding-right: 15px;
}

.tec-modal-title {
	margin: 0;
	font-size: 1.3em;
	font-weight: 600;
}

/* Recurring Event Indicator */
.tec-event-recurring-indicator {
	font-size: 0.85em;
	color: #666;
	padding: 4px 10px;
	background-color: #f0f0f0;
	border-radius: 4px;
	margin-top: 8px;
	display: inline-block;
}

.tec-recurring-icon {
	font-weight: bold;
	color: #0073aa;
	margin-right: 4px;
}

.tec-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	opacity: 0.7;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s ease;
}

.tec-modal-close:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.1);
}

/* Modal Body */
.tec-modal-body {
	padding: 25px;
	overflow-y: auto;
	flex: 1;
}

.tec-event-details {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Featured Image in Modal */
.tec-event-featured-image-modal {
	margin-bottom: 20px;
}

.tec-modal-featured-img {
	width: 100%;
	max-height: 200px;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tec-event-meta {
	display: grid;
	gap: 12px;
}

.tec-event-meta-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tec-meta-label {
	font-weight: 600;
	font-size: 0.9em;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	opacity: 0.7;
}

.tec-meta-value {
	font-weight: 500;
	font-size: 1em;
}

.tec-event-description {
	margin-top: 20px;
}

.tec-description-title {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.tec-description-content {
	line-height: 1.6;
	font-size: 0.95em;
}

/* Modal Footer */
.tec-modal-footer {
	padding: 20px 25px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.tec-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.tec-btn {
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9em;
	border: 2px solid transparent;
	transition: all 0.2s ease;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	justify-content: center;
}

.tec-btn-primary {
	border: 2px solid currentColor;
}

.tec-btn-primary:hover {
	opacity: 0.8;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

@media (max-width: 768px) {
	.tec-fullcalendar-wrapper {
		margin: 15px 0;
	}
	
	.tec-events-header {
		flex-direction: column;
		text-align: center;
		gap: 15px;
	}
	
	.tec-events-title {
		font-size: 1.5em;
	}
	
	.tec-modal-content {
		margin: 10px;
		max-height: calc(100vh - 20px);
	}
	
	.tec-modal-header,
	.tec-modal-body,
	.tec-modal-footer {
		padding: 15px;
	}
	
	.tec-modal-title {
		font-size: 1.2em;
	}
	
	.tec-modal-actions {
		flex-direction: column;
	}
	
	.tec-btn {
		width: 100%;
	}
	
	/* FullCalendar mobile adjustments */
	.tec-fullcalendar .fc-toolbar {
		padding: 10px 15px;
	}
	
	.tec-fullcalendar .fc-toolbar-title {
		font-size: 1.3em;
	}
	
	.tec-fullcalendar .fc-toolbar-chunk {
		display: flex;
		align-items: center;
		gap: 5px;
	}
	
	.tec-fullcalendar .fc-button {
		padding: 6px 10px;
		font-size: 0.85em;
	}
	
	.tec-fullcalendar .fc-daygrid-day-top {
		padding: 4px;
		font-size: 0.9em;
	}
	
	.tec-fullcalendar .fc-event {
		font-size: 0.8em;
		margin: 1px;
		padding: 1px 4px;
	}
	
	.tec-calendar-empty {
		padding: 40px 15px;
	}
	
	.tec-empty-icon {
		font-size: 2.5em;
	}
	
	.tec-empty-title {
		font-size: 1.2em;
	}
}

@media (max-width: 480px) {
	.tec-fullcalendar .fc-toolbar {
		flex-direction: column;
		gap: 10px;
		padding: 15px 10px;
	}
	
	.tec-fullcalendar .fc-toolbar-title {
		order: 2;
		font-size: 1.1em;
	}
	
	.tec-fullcalendar .fc-toolbar-chunk:first-child {
		order: 1;
	}
	
	.tec-fullcalendar .fc-toolbar-chunk:last-child {
		order: 3;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

/* ==========================================================================
   Upcoming Events List View
   ========================================================================== */

.tec-upcoming-events-wrapper {
	margin: 20px 0;
}

.tec-upcoming-events-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tec-upcoming-event-item {
	display: flex;
	align-items: stretch;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	margin-bottom: 12px;
	overflow: hidden;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tec-upcoming-event-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.tec-upcoming-event-item:last-child {
	margin-bottom: 0;
}

/* Date Badge */
.tec-upcoming-date-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 70px;
	padding: 12px 8px;
	color: #ffffff;
	text-align: center;
}

.tec-upcoming-month {
	font-size: 0.7em;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	opacity: 0.9;
}

.tec-upcoming-day {
	font-size: 1.8em;
	font-weight: 700;
	line-height: 1.1;
}

.tec-upcoming-weekday {
	font-size: 0.65em;
	font-weight: 500;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	opacity: 0.8;
}

/* Event Content */
.tec-upcoming-event-content {
	flex: 1;
	padding: 15px 20px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.tec-upcoming-event-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.tec-upcoming-event-title {
	margin: 0 0 6px;
	font-size: 1.1em;
	font-weight: 600;
	line-height: 1.3;
}

.tec-upcoming-event-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tec-upcoming-event-title a:hover {
	color: #0073aa;
}

.tec-upcoming-recurring-icon {
	display: inline-block;
	margin-left: 6px;
	font-size: 0.85em;
	color: #0073aa;
	vertical-align: middle;
}

/* Event Actions */
.tec-upcoming-event-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.tec-upcoming-action-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	background: #f8f9fa;
	color: #666;
	text-decoration: none;
	transition: all 0.2s ease;
	font-size: 0.9em;
}

.tec-upcoming-action-btn:hover {
	background: #e9ecef;
	border-color: rgba(0, 0, 0, 0.2);
	color: #333;
}

/* Event Meta */
.tec-upcoming-event-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.9em;
	color: #666;
}

.tec-upcoming-datetime,
.tec-upcoming-location {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.tec-icon-calendar,
.tec-icon-location,
.tec-icon-link {
	font-style: normal;
}

/* Event Description */
.tec-upcoming-event-description {
	margin: 10px 0 0;
	font-size: 0.9em;
	color: #666;
	line-height: 1.5;
}

/* Empty State */
.tec-upcoming-empty {
	text-align: center;
	padding: 40px 20px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive Design for Upcoming Events */
@media (max-width: 600px) {
	.tec-upcoming-event-item {
		flex-direction: column;
	}

	.tec-upcoming-date-badge {
		flex-direction: row;
		min-width: 100%;
		padding: 10px 15px;
		gap: 8px;
	}

	.tec-upcoming-month {
		font-size: 0.85em;
	}

	.tec-upcoming-day {
		font-size: 1.2em;
	}

	.tec-upcoming-weekday {
		font-size: 0.75em;
	}

	.tec-upcoming-event-content {
		padding: 12px 15px;
	}

	.tec-upcoming-event-header {
		flex-direction: column;
		gap: 8px;
	}

	.tec-upcoming-event-actions {
		align-self: flex-start;
	}

	.tec-upcoming-event-meta {
		flex-direction: column;
		gap: 6px;
	}
}

/* ==========================================================================
   Calendar Custom List View
   ========================================================================== */

.tec-custom-list-view {
	background: #ffffff;
	border-radius: 8px;
	padding: 20px;
}

.tec-list-view-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tec-list-view-title {
	margin: 0;
	font-size: 1.5em;
	font-weight: 600;
	color: #333;
}

.tec-btn-grid-view {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #f8f9fa;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	color: #333;
	font-size: 0.9em;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tec-btn-grid-view:hover {
	background: #e9ecef;
	border-color: rgba(0, 0, 0, 0.2);
}

.tec-btn-grid-view i {
	font-size: 1.1em;
}

/* Calendar List View Content */
.tec-list-view-content {
	margin-bottom: 20px;
}

.tec-calendar-list.tec-upcoming-events-list {
	margin: 0;
}

/* Pagination */
.tec-list-view-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 15px;
	padding-top: 15px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.tec-list-view-pagination .tec-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #f8f9fa;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	color: #333;
	font-size: 0.9em;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tec-list-view-pagination .tec-btn:hover:not(:disabled) {
	background: #e9ecef;
	border-color: rgba(0, 0, 0, 0.2);
}

.tec-list-view-pagination .tec-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.tec-list-view-pagination .tec-btn i {
	font-size: 0.85em;
}

.tec-pagination-info {
	font-size: 0.9em;
	color: #666;
	min-width: 80px;
	text-align: center;
}

/* List View Empty State */
.tec-list-view-empty {
	text-align: center;
	padding: 60px 20px;
}

.tec-list-view-empty .tec-empty-icon {
	font-size: 3em;
	display: block;
	margin-bottom: 15px;
}

.tec-list-view-empty .tec-empty-title {
	font-size: 1.2em;
	font-weight: 600;
	color: #333;
	margin: 0 0 8px;
}

.tec-list-view-empty .tec-empty-description {
	font-size: 0.95em;
	color: #666;
	margin: 0;
}

/* Custom List View Button in FullCalendar */
.tec-fullcalendar .fc-tecListView-button {
	position: relative;
	min-width: 40px !important;
	padding: 8px 12px !important;
}

.tec-fullcalendar .fc-tecListView-button i {
	font-size: 1em;
}

/* Responsive Design for Calendar List View */
@media (max-width: 600px) {
	.tec-custom-list-view {
		padding: 15px;
	}

	.tec-list-view-header {
		flex-direction: column;
		gap: 12px;
		align-items: flex-start;
	}

	.tec-list-view-title {
		font-size: 1.3em;
	}

	.tec-btn-grid-view {
		width: 100%;
		justify-content: center;
	}

	.tec-list-view-pagination {
		flex-wrap: wrap;
		gap: 10px;
	}

	.tec-list-view-pagination .tec-btn {
		padding: 8px 12px;
		font-size: 0.85em;
	}

	.tec-pagination-info {
		width: 100%;
		order: -1;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.tec-fullcalendar-wrapper {
		margin: 0;
	}
	
	.tec-events-header {
		border-bottom: 2px solid rgba(0, 0, 0, 0.3);
		margin-bottom: 20px;
	}
	
	.tec-event-modal {
		display: none !important;
	}
	
	.tec-fullcalendar .fc-button,
	.tec-calendar-loading {
		display: none !important;
	}
	
	.tec-fullcalendar {
		box-shadow: none;
		border: 1px solid rgba(0, 0, 0, 0.2);
	}
}