/**
 * Schedule Ticker Styles (PRO)
 *
 * @package AthleticsWP
 * @author AthleticsWP
 * @since 1.0.0
 */

/* CSS Custom Properties for font sizes */
:root {
	/* Font sizes - using pixels for consistent rendering */
	--awp-ticker-font-xs: 10px;
	--awp-ticker-font-sm: 11px;
	--awp-ticker-font-base: 12px;
	--awp-ticker-font-md: 14px;
	--awp-ticker-font-lg: 15px;
}

/* Container */
.awp-schedule-ticker {
	position: relative;
	overflow: hidden;
	background: #f8f9fa;
	border-radius: 8px;
	padding: 16px 0;
	margin: 32px 0;
}

/* Track */
.awp-ticker-track {
	overflow: hidden;
	position: relative;
	padding: 0 16px;
	user-select: none;
	-webkit-user-select: none;
}

/* Content wrapper - no animation, using JS intervals */
.awp-ticker-content {
	display: flex;
	gap: 16px;
	cursor: grab;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.awp-ticker-content:active {
	cursor: grabbing;
}

.awp-ticker--dragging .awp-ticker-content {
	transition: none !important;
}

/* Card */
.awp-ticker-card {
	flex: 0 0 auto;
	background: white;
	border-radius: 6px;
	padding: 16px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	cursor: pointer;
	min-height: 140px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.awp-ticker-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Card Header */
.awp-ticker-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 8px;
	border-bottom: 1px solid #e5e7eb;
	font-size: var(--awp-ticker-font-base);
	color: #6b7280;
	gap: 8px;
}

.awp-ticker-header-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.awp-ticker-date {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

.awp-ticker-time {
	font-weight: 500;
}

/* Sport Badge */
.awp-ticker-sport-badge {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 2px 6px;
	background: #f3f4f6;
	border-radius: 4px;
	margin-left: auto;
}

.awp-ticker-sport-icon {
	display: inline-flex;
	align-items: center;
	width: 14px;
	height: 14px;
}

.awp-ticker-sport-icon svg {
	width: 100% !important;
	height: 100% !important;
	stroke: #6b7280;
	fill: none;
	display: block;
}

.awp-ticker-sport-name {
	font-size: var(--awp-ticker-font-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	color: #6b7280;
}

/* Matchup */
.awp-ticker-matchup {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	justify-content: center;
}

.awp-ticker-team {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: var(--awp-ticker-font-md);
}

.awp-ticker-team--away {
	order: 1;
}

.awp-ticker-separator {
	order: 2;
	color: #9ca3af;
	font-size: var(--awp-ticker-font-base);
	padding-left: 28px; /* Align with team names when logos present */
	opacity: 0.7;
}

.awp-ticker-team--home {
	order: 3;
}

.awp-ticker-logo {
	width: 20px;
	height: 20px;
	object-fit: contain;
	border-radius: 2px;
}

.awp-ticker-team-name {
	font-weight: 500;
	color: #111827;
	flex: 1;
}

.awp-ticker-score {
	font-weight: 700;
	color: #111827;
	margin-left: auto;
}


/* Result/Status */
.awp-ticker-result,
.awp-ticker-status {
	font-size: var(--awp-ticker-font-base);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	padding: 4px 8px;
	border-radius: 4px;
	text-align: center;
}

.awp-ticker-result--win {
	background: #d1fae5;
	color: #065f46;
}

.awp-ticker-result--loss {
	background: #fee2e2;
	color: #991b1b;
}

.awp-ticker-result--tie,
.awp-ticker-result--draw {
	background: #fef3c7;
	color: #92400e;
}

.awp-ticker-status {
	background: #f3f4f6;
	color: #6b7280;
	font-style: italic;
	text-transform: none;
}

/* Controls */
.awp-ticker-controls {
	position: absolute;
	bottom: 8px;
	right: 8px;
	display: flex !important;
	gap: 4px;
	background: white;
	padding: 4px;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	z-index: 10;
	font-size: 0 !important; /* Prevent font size inheritance */
	line-height: 0 !important;
}

.awp-ticker-control {
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	min-height: 28px !important;
	max-width: 28px !important;
	max-height: 28px !important;
	border: none;
	background: transparent;
	color: #6b7280;
	cursor: pointer;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 4px;
	transition: all 0.2s ease;
	padding: 0 !important;
	position: relative;
	overflow: hidden;
}

.awp-ticker-control:hover {
	background: #f3f4f6;
	color: #111827;
}

.awp-ticker-control:active {
	transform: scale(0.95);
}

.awp-ticker-control svg {
	width: 16px !important;
	height: 16px !important;
	min-width: 16px !important;
	min-height: 16px !important;
	max-width: 16px !important;
	max-height: 16px !important;
	fill: currentColor;
	stroke: currentColor;
	display: block !important;
	position: relative;
	margin: 0 !important;
	padding: 0 !important;
}

/* Force SVG size for all button states */
.awp-ticker-control--prev svg,
.awp-ticker-control--next svg,
.awp-ticker-control--play svg,
.awp-ticker-control--pause svg {
	width: 16px !important;
	height: 16px !important;
}

/* Override inline SVG attributes */
.awp-ticker-control svg[width],
.awp-ticker-control svg[height] {
	width: 16px !important;
	height: 16px !important;
}

/* Ensure button doesn't expand */
.awp-ticker-controls button {
	width: 28px !important;
	height: 28px !important;
	padding: 0 !important;
	flex: 0 0 28px !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.awp-schedule-ticker {
		padding: 12px 0;
		margin: 16px 0;
	}
	
	.awp-ticker-card {
		min-width: 240px;
		padding: 12px;
		min-height: 120px;
	}
	
	.awp-ticker-logo {
		width: 18px;
		height: 18px;
	}
	
	.awp-ticker-controls {
		display: none; /* Hide controls on mobile */
	}
	
	.awp-ticker-content {
		animation-duration: 20s; /* Faster on mobile */
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.awp-schedule-ticker {
		background: #1f2937;
	}
	
	.awp-ticker-card {
		background: #111827;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	}
	
	.awp-ticker-card-header {
		border-bottom-color: #374151;
		color: #9ca3af;
	}
	
	.awp-ticker-team-name {
		color: #f3f4f6;
	}
	
	.awp-ticker-score {
		color: white;
	}
	
	.awp-ticker-sport-badge {
		background: #374151;
	}
	
	.awp-ticker-sport-icon svg {
		stroke: #d1d5db;
	}
	
	.awp-ticker-sport-name {
		color: #d1d5db;
	}
	
	.awp-ticker-controls {
		background: #1f2937;
	}
	
	.awp-ticker-control {
		color: #9ca3af;
	}
	
	.awp-ticker-control:hover {
		background: #374151;
		color: #f3f4f6;
	}
}