/*
   My Tickets - Modern Light Mode Design
   Primary Color: #3b82f6
*/

/* CSS Variables for consistency */
:root {
	--primary-color: #3b82f6;
	--border-color: #e2e8f0;
	--text-dark: #1e293b;
	--bg-light: #f8fafc;
}

/* Container */
.events-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 1rem 3rem;
	background-color: #ffffff;
}

/* Header Section */
.events-header {
	text-align: center;
	margin-bottom: 2.5rem;
	padding: 1rem 0;
}

.header-image {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Main Container */
.my-tickets-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem;
	width: 100%;
	box-sizing: border-box;
}

/* Loading State */
.loading-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4rem 1.5rem;
	min-height: 400px;
}

.spinner-wrapper {
	margin-bottom: 1.5rem;
}

.spinner-border {
	width: 3rem;
	height: 3rem;
	border-width: 0.3rem;
	border-color: #3b82f6;
	border-right-color: transparent;
}

.loading-text {
	font-size: 1.125rem;
	color: #64748b;
	margin: 0;
	font-weight: 500;
}

/* Empty State */
.empty-state {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 3rem 1.5rem;
	min-height: 400px;
}

.empty-state-card {
	background: #ffffff;
	border-radius: 16px;
	padding: 3rem 2rem;
	text-align: center;
	max-width: 500px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	border: 1px solid #e2e8f0;
}

.empty-state-icon {
	font-size: 4rem;
	margin-bottom: 1.5rem;
	opacity: 0.8;
}

.empty-state-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 0.75rem;
}

.empty-state-description {
	font-size: 1rem;
	color: #64748b;
	margin-bottom: 2rem;
	line-height: 1.6;
}

.btn-browse-events {
	display: inline-block;
	background: #3b82f6;
	color: #ffffff;
	padding: 0.875rem 2rem;
	border-radius: 10px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

	.btn-browse-events:hover {
		background: #2563eb;
		transform: translateY(-2px);
		box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
		color: #ffffff;
	}

/* Tickets Section */
.tickets-section {
	padding: 1rem 0;
}

.section-header {
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid #e2e8f0;
}

.section-title {
	font-size: 2rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 0.5rem;
}

.section-subtitle {
	font-size: 1rem;
	color: #64748b;
	margin: 0;
}

/* Tickets Grid */
.tickets-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	min-width: 0;
}

/* Ticket Card */
.ticket-card {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
	border: 1px solid #e2e8f0;
	transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

	.ticket-card:hover {
		box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
		transform: translateY(-4px);
		border-color: #cbd5e1;
	}

/* Ticket Card Header */
.ticket-card-header {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.ticket-status-badge {
	display: flex;
	justify-content: flex-end;
}

.ticket-header-status-panel {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	min-width: 0;
}

.ticket-header-status-panel .ticket-status-badge {
	justify-content: flex-start;
}

.ticket-header-scan-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
	text-align: center;
}

.ticket-scan-label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #64748b;
}

.ticket-scan-status-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.ticket-scan-value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1;
}

.ticket-scan-value.scanned-yes {
	background: #dcfce7;
	color: #166534;
}

.ticket-scan-value.scanned-no {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #64748b;
}

.ticket-scan-time {
	font-size: 0.85rem;
	font-weight: 500;
	color: #475569;
	text-align: center;
}

.status-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.025em;
}

.status-paid {
	background: #dcfce7;
	color: #166534;
}

.status-available {
	background: #fef3c7;
	color: #92400e;
}

.status-failed {
	background: #fee2e2;
	color: #991b1b;
}

.status-cancelled {
	background: #f1f5f9;
	color: #475569;
}

.status-refunded {
	background: #dbeafe;
	color: #1e40af;
}

/* Partial.ly payment plan: amber, so it reads as 'money still owed' next to the green paid badge
   and the grey neutral ones. Same box metrics as every other status badge, so the header row keeps
   its layout on narrow screens. */
.status-payment-plan {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #f59e0b;
}

.status-default {
	background: #f1f5f9;
	color: #475569;
}

/* ===================================
   PROGRESS BAR SECTION - NEW
   =================================== */

.progress-bar-section {
	padding: 2rem 1.5rem;
	background: #ffffff;
	border-bottom: 1px solid #e2e8f0;
}

.progress-bar-container {
	position: relative;
	width: 100%;
}

/* Progress Track */
.progress-bar-track {
	position: absolute;
	top: 20px;
	left: 0;
	right: 0;
	height: 4px;
	background: #e2e8f0;
	border-radius: 2px;
	z-index: 1;
}

.progress-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
	border-radius: 2px;
	transition: width 0.6s ease;
}

/* Progress Stages Container */
.progress-stages {
	display: flex;
	justify-content: space-between;
	position: relative;
	z-index: 2;
	gap: 0.5rem;
}

/* Individual Progress Stage */
.progress-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	text-align: center;
	min-width: 0;
}

/* Stage Dot */
.stage-dot {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #ffffff;
	border: 3px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.75rem;
	transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
	font-weight: 700;
	color: #94a3b8;
	font-size: 0.875rem;
	position: relative;
	z-index: 3;
}

.stage-number {
	display: block;
}

.check-icon {
	display: none;
}

/* Active Stage Dot */
.progress-stage.active .stage-dot {
	border-color: #3b82f6;
	background: #3b82f6;
	color: #ffffff;
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

	.progress-stage.active .stage-dot .stage-number {
		color: #ffffff;
	}

/* Completed Stage Dot */
.progress-stage.completed .stage-dot {
	border-color: #3b82f6;
	background: #3b82f6;
	color: #ffffff;
}

	.progress-stage.completed .stage-dot .stage-number {
		display: none;
	}

.progress-stage.completed .check-icon {
	display: block;
}

/* Stage Labels */
.stage-label {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	width: 100%;
	min-width: 0;
}

.stage-title {
	font-size: 0.75rem;
	font-weight: 600;
	color: #94a3b8;
	transition: color 0.3s ease;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.stage-subtitle {
	font-size: 0.625rem;
	color: #cbd5e1;
	font-weight: 500;
	transition: color 0.3s ease;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* Active Stage Labels */
.progress-stage.active .stage-title {
	color: #3b82f6;
}

.progress-stage.active .stage-subtitle {
	color: #64748b;
}

/* Completed Stage Labels */
.progress-stage.completed .stage-title {
	color: #1e293b;
}

.progress-stage.completed .stage-subtitle {
	color: #64748b;
}

/* ===================================
   END PROGRESS BAR SECTION
   =================================== */

/* Ticket Card Body */
.ticket-card-body {
	padding: 1.5rem;
	min-width: 0;
}

.event-name {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 1.5rem;
	line-height: 1.3;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.ticket-details {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

.detail-row {
	display: grid;
	grid-template-columns: minmax(92px, 120px) minmax(0, 1fr);
	align-items: start;
	column-gap: 0.75rem;
	padding: 0.75rem;
	background: #f8fafc;
	border-radius: 8px;
	border-left: 3px solid #3b82f6;
	min-width: 0;
	box-sizing: border-box;
}

.detail-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	min-width: 0;
	line-height: 1.35;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.detail-value {
	font-size: 1rem;
	font-weight: 600;
	color: #1e293b;
	text-align: right;
	min-width: 0;
	max-width: 100%;
	line-height: 1.4;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

	.detail-value.price {
		color: #3b82f6;
		font-size: 1.125rem;
	}
	.detail-value.address {
		font-size: 0.80rem;
	}

.text-muted {
	color: #94a3b8;
	font-style: italic;
}

/* Ticket Card Footer */
.ticket-card-footer {
	padding: 1.25rem 1.5rem;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.btn-view-event {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	background: #3b82f6;
	color: #ffffff;
	padding: 0.875rem 1.5rem;
	border: none;
	border-radius: 10px;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

	.btn-view-event:hover {
		background: #2563eb;
		transform: translateY(-2px);
		box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
	}

	.btn-view-event:active {
		transform: translateY(0);
	}

.btn-icon {
	transition: transform 0.2s ease;
}

.btn-view-event:hover .btn-icon {
	transform: translateX(4px);
}

/* ===================================
   Pagination Controls - Dashboard Style
   =================================== */

.pagination-controls {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 16px;
	border-top: 1px solid var(--border-color);
	flex-wrap: wrap;
	align-items: center;
}

.pagination-btn {
	min-width: 40px;
	height: 40px;
	padding: 8px 12px;
	border: 1px solid var(--border-color);
	background-color: #ffffff;
	color: var(--text-dark);
	border-radius: 6px;
	cursor: pointer;
	font-weight: 500;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.pagination-btn.pagination-nav {
	min-width: 56px;
	padding: 8px 14px;
}

.pagination-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: #f8fafc;
	color: #94a3b8;
	border-color: #dbe3ee;
}

	/* Hover state for non-active pagination buttons */
	.pagination-btn:hover:not(.active) {
		background-color: var(--bg-light);
		border-color: var(--primary-color);
	}

	/* Active state for the current page button */
	.pagination-btn.active {
		background-color: var(--primary-color);
		color: white;
		border-color: var(--primary-color);
	}

	/* Active state for buttons when clicked */
	.pagination-btn:active {
		transform: scale(0.95);
	}

.pagination-ellipsis {
	min-width: 24px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	font-weight: 600;
}


/* ===================================
   RESPONSIVE DESIGN FOR PROGRESS BAR
   =================================== */

/* Mobile Optimizations */
@media (max-width: 767px) {
	.events-container {
		padding: 0 0.75rem 2rem;
	}

	.my-tickets-container {
		padding: 1rem 0.75rem;
	}

	.section-header {
		margin-bottom: 1.5rem;
		padding-bottom: 1rem;
	}

	.filter-search-container,
	.ticket-card-header,
	.ticket-card-body,
	.ticket-card-footer {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.event-name {
		font-size: 1.25rem;
		margin-bottom: 1rem;
	}

	.detail-row {
		grid-template-columns: minmax(74px, 92px) minmax(0, 1fr);
		column-gap: 0.65rem;
		padding: 0.75rem 0.7rem;
	}

	.detail-label {
		font-size: 0.75rem;
	}

	.detail-value {
		font-size: 0.95rem;
	}

	.filter-tabs {
		display: grid;
		grid-template-columns: 1fr;
	}

	.filter-tab {
		justify-content: space-between;
		width: 100%;
	}

	.pagination-controls {
		padding: 12px 0 0;
		gap: 6px;
	}

	.progress-bar-section {
		padding: 1.5rem 1rem;
	}

	.stage-title {
		font-size: 0.625rem;
		line-height: 1.2;
	}

	.stage-subtitle {
		font-size: 0.5rem;
	}

	.stage-dot {
		width: 36px;
		height: 36px;
		font-size: 0.75rem;
	}

	.progress-bar-track {
		top: 18px;
	}
}

/* Tablet and Up */
@media (min-width: 768px) {
	.my-tickets-container {
		padding: 2rem;
	}

	.tickets-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem;
	}

	.section-title {
		font-size: 2.25rem;
	}

	.empty-state-card {
		padding: 4rem 3rem;
	}

	.progress-bar-section {
		padding: 2.5rem 2rem;
	}

	.stage-title {
		font-size: 0.875rem;
	}

	.stage-subtitle {
		font-size: 0.75rem; 
	}
}

/* Desktop */
@media (min-width: 1024px) {
	.my-tickets-container {
		padding: 2.5rem;
	}

	.section-header {
		margin-bottom: 2.5rem;
	}

	.stage-title {
		font-size: 0.9rem;
	}

	.stage-subtitle {
		font-size: 0.8rem;
	}
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.ticket-card,
	.btn-view-event,
	.btn-browse-events,
	.btn-icon,
	.pagination-btn,
	.progress-bar-fill,
	.stage-dot,
	.stage-title,
	.stage-subtitle {
		transition: none;
	}
}
/* Green "Available" Stage - Special styling for stage 4 when active */
.progress-stage.available-stage.active .stage-dot {
	border-color: #10b981;
	background: #10b981;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.ticket-icon {
	display: block;
}

/* Disabled Button State */
.btn-view-event.disabled,
.btn-view-event:disabled {
	background: #e2e8f0;
	color: #94a3b8;
	cursor: not-allowed;
	box-shadow: none;
}

	.btn-view-event.disabled:hover,
	.btn-view-event:disabled:hover {
		background: #e2e8f0;
		transform: none;
		box-shadow: none;
	}

/* ===================================
   FILTER AND SEARCH SECTION
   =================================== */

.filter-search-container {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-bottom: 2rem;
	padding: 1.5rem;
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Search Box */
.search-box-wrapper {
	position: relative;
	width: 100%;
}

.search-icon {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.search-input {
	width: 100%;
	padding: 0.875rem 3rem 0.875rem 3rem;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	font-size: 1rem;
	color: #1e293b;
	background: #f8fafc;
	transition: border-color 0.2s ease, background 0.2s ease;
}

	.search-input:focus {
		outline: none;
		border-color: #3b82f6;
		background: #ffffff;
	}

	.search-input::placeholder {
		color: #94a3b8;
	}

.clear-search-btn {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease;
}

	.clear-search-btn:hover {
		opacity: 0.7;
	}

/* Filter Tabs */
.filter-tabs {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	min-width: 0;
}

.filter-tab {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	background: #f8fafc;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	font-size: 0.938rem;
	font-weight: 600;
	color: #64748b;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
	min-width: 0;
}

	.filter-tab:hover {
		background: #f1f5f9;
		border-color: #cbd5e1;
		color: #475569;
	}

	.filter-tab.active {
		background: #3b82f6;
		border-color: #3b82f6;
		color: #ffffff;
		transform: translateY(-2px);
		box-shadow: 0 4px 8px rgba(59, 130, 246, 0.25);
	}

.tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 0.5rem;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	font-size: 0.813rem;
	font-weight: 700;
}

.filter-tab.active .tab-count {
	background: rgba(255, 255, 255, 0.25);
}

/* Responsive for Filter Section */
@media (min-width: 768px) {
	.filter-search-container {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.search-box-wrapper {
		max-width: 400px;
	}

	.filter-tabs {
		flex-wrap: nowrap;
	}
}

@media (max-width: 767px) {
	.ticket-card-header {
		flex-direction: column;
		align-items: stretch;
	}

	.ticket-status-badge {
		justify-content: flex-start;
	}

	.ticket-scan-status-row {
		align-items: flex-start;
	}
}

.ticket-email-sent {
    margin-top: 0.625rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #52677d;
}
