/* This stylesheet will be common across all the modules */

/* Our default colors. These should be overridden by individual modules as needed */
:root {
	--primary-color: #007aff;
	--primary-contrast-color: white;
	--secondary-color: slategray;
	--secondary-contrast-color: white;
	--dark-color: #334155;
	--dark-contrast-color: #ddd;
	--danger-color: crimson;
	--danger-contrast-color: white;
	--warning-color: darkorange;
	--warning-contrast-color: white;
	--success-color: darkgreen;
	--success-contrast-color: white;
	--info-color: darkcyan;
	--info-contrast-color: white;

	--accent-color: var(--primary-color);

	/* Insets for hardware "safe areas" (notches, the Dynamic Island, home-indicator
	   strips, etc.) on devices such as iPhones. These require
	   <meta name="viewport" content="...viewport-fit=cover"> to be non-zero, and
	   fall back to 0px everywhere else. Exposed as custom properties (rather than
	   using env() inline everywhere) so JS can also read them via getComputedStyle. */
	--safe-area-inset-top: env(safe-area-inset-top, 0px);
	--safe-area-inset-right: env(safe-area-inset-right, 0px);
	--safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
	--safe-area-inset-left: env(safe-area-inset-left, 0px);
}

/*.custom-background {
	background: linear-gradient(
		225deg,
		#631683 0%,
		#7f237e 14.286%,
		#9e3980 28.571%,
		#bc5588 42.857%,
		#d57496 57.143%,
		#e494a8 71.429%,
		#e7b1be 85.714%,
		#dec8d6 100%
	);
}*/

/* Modify our native checkboxes (to make them slightly bigger than default) */
/*.custom-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.custom-checkbox input[type="checkbox"] {
	width: 1.5em;
	height: 1.5em;
	accent-color: var(--primary-color);
}*/

/* Making our dialog boxes more or less univerally styled across all our modules */
/*dialog::backdrop {
	background: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(2.5px);
}*/

/* Keep every <dialog> - and, in particular, its title bar and close button -
   fully inside the safe display area so it's never rendered underneath (and
   made inaccessible by) a notch, the Dynamic Island, or the home-indicator
   strip on iOS devices. This only affects dialogs that rely on the browser's
   default centering; any dialog/rule that sets its own top/left/right/bottom
   (by id, class, or inline style) takes precedence over this default. */
/*dialog {
	top: var(--safe-area-inset-top);
	right: var(--safe-area-inset-right);
	bottom: var(--safe-area-inset-bottom);
	left: var(--safe-area-inset-left);
	max-width: calc(100vw - var(--safe-area-inset-left) - var(--safe-area-inset-right));
	max-height: calc(100dvh - var(--safe-area-inset-top) - var(--safe-area-inset-bottom));
}*/

/*.dialog-drag-handle button[aria-label="Close"] {
	display: inline-flex;
	flex: 0 0 2rem;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 0.375rem;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1rem;
	line-height: 1;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.dialog-drag-handle button[aria-label="Close"]:hover {
	background: rgba(255, 255, 255, 0.1);
}

.dialog-drag-handle button[aria-label="Close"]:focus-visible {
	outline: 1px solid rgba(255, 255, 255, 0.4);
	outline-offset: 1px;
}*/

/* This is a fix for the date input fields on mobile devices (or at least of Safari/iOS) */
/*input[type="date"] {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

input[type="date"]::-webkit-date-and-time-value {
	min-width: 0;
	text-align: left;
}*/

/* Universal styling */

/* Adding .fit to a table column auto-shrinks the column width */
table td.fit,
table th.fit {
	white-space: nowrap;
	width: 1%;
}

/* Just a cool clip effect - the background shows through text that is clipped */
.colorful-heading {
	background: linear-gradient(90deg, #ff3d81, #8b5cf6, #22d3ee);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

/* Our font we use to style text as credit card numbers, or numbers at the bottom of a check */
@font-face {
	font-family: "MICR";
	src: url("../../../media/fonts/micrenc.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	display: block;
	/* This blocks the display until the font is loaded so we don't get sudden font-switching */
}

.check-number {
	font-family: "MICR", monospace;
}

.cardholder-name {
	font-family: "OCR-B", "Roboto Mono", monospace;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}

/* Scrollbar styling for our scrollable areas */
.scroll-area {
	/* Firefox: invisible while idle */
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
	/* scrollbar-color: var(--primary-color, white) transparent; */
}

.scroll-area.is-scrolling {
	scrollbar-color: var(--primary-color, white) transparent;
}

/* Chrome, Safari, and Edge */
.scroll-area::-webkit-scrollbar {
	width: 8px;
}

.scroll-area::-webkit-scrollbar-track {
	background: transparent;
}

.scroll-area::-webkit-scrollbar-thumb {
	background: transparent;
	border-radius: 9999px;
}

.scroll-area.is-scrolling::-webkit-scrollbar-thumb {
	background: var(--primary-color, white);
}

.main-section {
	scrollbar-width: thin;
	scrollbar-color: var(--primary-color, #999) transparent;
}

.main-section::-webkit-scrollbar {
	width: 8px;
}

.main-section::-webkit-scrollbar-track {
	background: transparent;
}

.main-section::-webkit-scrollbar-thumb {
	background: var(--primary-color, #999);
	border-radius: 9999px;
}

/* HTML: <div class="loader"></div> */
/* .loader {
  width: 15px;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: l5 1s infinite linear alternate;
}
@keyframes l5 {
    0%  {box-shadow: 20px 0 #000, -20px 0 #0002;background: #000 }
    33% {box-shadow: 20px 0 #000, -20px 0 #0002;background: #0002}
    66% {box-shadow: 20px 0 #0002,-20px 0 #000; background: #0002}
    100%{box-shadow: 20px 0 #0002,-20px 0 #000; background: #000 }
} */

/* HTML: <div class="loader"></div> */
.loader {
	width: fit-content;
	font-weight: bold;
	font-size: 30px;
	background: radial-gradient(
			circle closest-side,
			var(--primary-color, #000) 94%,
			#0000
		)
		right/calc(200% - 1em) 100%;
	animation: l24 1s infinite alternate linear;
}

.loader::before {
	content: "Loading...";
	line-height: 1em;
	color: #0000;
	background: inherit;
	background-image: radial-gradient(circle closest-side, #fff 94%, #000);
	-webkit-background-clip: text;
	background-clip: text;
}

@keyframes l24 {
	100% {
		background-position: left;
	}
}



/*.btn-reveal {
	gap: 0;
}

.btn-reveal-label {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	opacity: 0;
	transition:
		max-width 200ms ease,
		margin-left 200ms ease,
		opacity 150ms ease;
}

.btn-reveal:hover .btn-reveal-label,
.btn-reveal:focus-visible .btn-reveal-label {
	max-width: 10rem;
	margin-left: 0.5rem;
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.btn-reveal-label {
		transition: none;
	}
}*/

.skeleton {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: shimmerloading 1.5s infinite;
}
@keyframes shimmerloading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}



.loader-light {
	--loader-color: var(--primary-color, #efeffa);
	position: absolute;
	top: calc(50% - 32px);
	left: calc(50% - 32px);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	perspective: 800px;
}

.loader-light .inner {
	position: absolute;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	border-radius: 50%;
}

.loader-light .inner.one {
	left: 0%;
	top: 0%;
	animation: rotate-one 1s linear infinite;
	border-bottom: 3px solid var(--loader-color);
}

.loader-light .inner.two {
	right: 0%;
	top: 0%;
	animation: rotate-two 1s linear infinite;
	border-right: 3px solid var(--loader-color);
}

.loader-light .inner.three {
	right: 0%;
	bottom: 0%;
	animation: rotate-three 1s linear infinite;
	border-top: 3px solid var(--loader-color);
}

@keyframes rotate-one {
	0% {
		transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
	}
	100% {
		transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
	}
}

@keyframes rotate-two {
	0% {
		transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
	}
	100% {
		transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
	}
}

@keyframes rotate-three {
	0% {
		transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
	}
	100% {
		transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
	}
}
