/* ========================================
   ATSK TRANSPORT WEB - Global Application Styles

   This file contains:
   - Base HTML/body resets
   - Blazor-specific styles (error boundaries, reconnect)
   - Loading animations
   - Legacy compatibility classes

   DESIGN SYSTEM: This file uses CSS custom properties from
   _design-tokens.css. Prefer using design tokens over hardcoded values:
   - Colors: var(--color-primary), var(--color-text-secondary), etc.
   - Spacing: var(--space-2), var(--space-4), etc.
   - Typography: var(--font-family-base), var(--font-size-base), etc.
   - Shadows: var(--shadow-sm), var(--shadow-md), etc.

   NOTE: Prefer Bootstrap utilities over custom classes:
   - Use .d-flex instead of .flex-row/.flex-column
   - Use .justify-content-end instead of .align-to-right
   - Use .d-none .d-md-block instead of .mobile-hide/.desktop-hide
   ======================================== */

/* ========================================
   BASE STYLES
   ======================================== */
html, body {
	font-family: var(--font-family-base, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif);
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
}

/* Remove focus outline on elements that shouldn't have visible focus */
h1:focus {
	outline: none;
}

.valid.modified:not([type=checkbox]) {
	outline: none;
}

/* ========================================
   BOOTSTRAP OVERRIDES
   Only override where ATSK branding differs from Bootstrap defaults
   ======================================== */
a, .btn-link {
	color: var(--color-primary);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
	box-shadow: none;
}

/* ========================================
   BLAZOR FRAMEWORK STYLES
   ======================================== */
.blazor-error-boundary {
	background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBh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ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
	padding: 1rem 1rem 1rem 3.7rem;
	color: white;
}

.blazor-error-boundary::after {
	content: "An error has occurred."
}

/* ========================================
   COMPONENT-SPECIFIC STYLES
   Feature-specific styles that can't use Bootstrap
   ======================================== */
.fares-zone-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
}

.fares-zone-card {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 10px;
}

.darker-border-checkbox.form-check-input {
	border-color: #929292;
}

/* ========================================
   LEGACY COMPATIBILITY CLASSES
   DEPRECATED: Use Bootstrap utilities instead
   These are kept for backwards compatibility only
   ======================================== */

/* DEPRECATED: Use Bootstrap .d-none .d-md-block instead */
.desktop-hide {
	display: none;
}

@media screen and (max-width: 767.98px) {
	.mobile-hide {
		display: none;
	}

	.desktop-hide {
		display: block;
	}
}

/* DEPRECATED: Use Bootstrap .d-flex .flex-row instead */
.flex-row {
	display: flex;
	flex-direction: row;
}

/* DEPRECATED: Use Bootstrap .d-flex .flex-column instead */
.flex-column {
	display: flex;
	flex-direction: column;
}

/* DEPRECATED: Use Bootstrap .d-flex .justify-content-end instead */
.align-to-right {
	display: flex;
	justify-content: flex-end;
}

.overlay-container {
	display: flex;
	position: absolute;
	height: 100%;
	width: 100%;
	justify-content: center;
	gap: 10px;
}

	.overlay-container .ball-pulse {
		width: 50px;
		height: 10px;
		margin-top: auto;
		margin-bottom: auto;
	}

.split-page-left .overlay-container {
	height: calc(100% - 64px);
	width: calc(100% - 64px);
}

.grid-with-top-buttons-layout > .overlay-container {
	height: calc(100% - 60px);
	width: calc(100% - 340px);
}

.grid-container > .overlay-container,
.gridContainersFullWidth > .overlay-container,
.card-full-width-update > .overlay-container,
.card-full-width > .overlay-container,
.card-OC > .overlay-container,
.user-type-grid-container > .overlay-container {
	position: relative;
}

.grid-with-top-buttons-layout.grid-with-top-buttons-layout-tab > .overlay-container,
.modalContainer .grid-with-top-buttons-layout .overlay-container,
.info-container > .overlay-container {
	position: relative;
	width: 100%;
}

/**
 * Dots
 */
@-webkit-keyframes scale {
	0% {
		-webkit-transform: scale(1);
		transform: scale(1);
		opacity: 1;
	}

	45% {
		-webkit-transform: scale(0.1);
		transform: scale(0.1);
		opacity: 0.7;
	}

	80% {
		-webkit-transform: scale(1);
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes scale {
	0% {
		-webkit-transform: scale(1);
		transform: scale(1);
		opacity: 1;
	}

	45% {
		-webkit-transform: scale(0.1);
		transform: scale(0.1);
		opacity: 0.7;
	}

	80% {
		-webkit-transform: scale(1);
		transform: scale(1);
		opacity: 1;
	}
}

.ball-pulse > div:nth-child(0) {
	-webkit-animation: scale 0.75s -0.36s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
	animation: scale 0.75s -0.36s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
}

.ball-pulse > div:nth-child(1) {
	-webkit-animation: scale 0.75s -0.24s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
	animation: scale 0.75s -0.24s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
}

.ball-pulse > div:nth-child(2) {
	-webkit-animation: scale 0.75s -0.12s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
	animation: scale 0.75s -0.12s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
}

.ball-pulse > div:nth-child(3) {
	-webkit-animation: scale 0.75s 0s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
	animation: scale 0.75s 0s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
}

.ball-pulse > div {
	background-color: var(--color-dark-legacy, #1D1D1B);
	width: 10px;
	height: 10px;
	border-radius: 100%;
	margin: 0;
	-webkit-animation-fill-mode: both;
	animation-fill-mode: both;
	display: inline-block;
}

#components-reconnect-modal {
	visibility: hidden;
}

	#components-reconnect-modal .components-reconnect-container {
		visibility: hidden;
		display: none;
	}

	#components-reconnect-modal.components-reconnect-show,
	#components-reconnect-modal.components-reconnect-retrying,
	#components-reconnect-modal.components-reconnect-failed,
	#components-reconnect-modal.components-reconnect-rejected,
	#components-reconnect-modal.components-reconnect-paused,
#components-reconnect-modal.components-reconnect-resume-failed,
#components-reconnect-modal.components-reconnect-auto {
		visibility: visible;
	}

	#components-reconnect-modal.components-reconnect-show .components-reconnect-container,
	#components-reconnect-modal.components-reconnect-retrying .components-reconnect-container,
	#components-reconnect-modal.components-reconnect-failed .components-reconnect-container,
	#components-reconnect-modal.components-reconnect-rejected .components-reconnect-container,
	#components-reconnect-modal.components-reconnect-paused .components-reconnect-container,
#components-reconnect-modal.components-reconnect-resume-failed .components-reconnect-container,
#components-reconnect-modal.components-reconnect-auto .components-reconnect-container {
		visibility: visible;
		display: flex;
	}

.error-page {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: fixed;
	inset: 0px;
	z-index: 1050;
	overflow: hidden;
	background-color: rgba(0, 0, 0, 0.6);
	text-align: center;
	transition: visibility linear 500ms;
	color: #FFFFFF;
	font-weight: 500;
	font-size: 20px;
	font-family: Inter;
}

.refresh-label {
	color: #ECC500;
	font-weight: 700;
}

.refresh-anchor {
	text-decoration: none;
	text-decoration-line: none !important;
}

.multiline {
	white-space: pre-wrap;
}


.error-anchor .hover-image,
.error-anchor:hover .no-hover-image {
	display: none;
}

.error-anchor .no-hover-image,
.error-anchor:hover .hover-image {
	display: block;
}

.home-logout-holder {
	margin: 2rem;
}
