/* latin-ext */
@font-face {
	font-family: 'Outfit';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../webfonts/Outfit-latin-ext.woff2") format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
	font-family: 'Outfit';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../webfonts/Outfit-latin.woff2") format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.basel-button.marker-button {
	width: 2rem;
	height: 2rem;
	padding: 0;
	border-radius: 4px;
	border: 1px solid #243363;
}

.basel-close-button {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	background: none;
	line-height: 1;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: #333;
	z-index: 10001;
}

#basel-spinner {
	svg {
		animation: rotateSpinner 1600ms linear infinite;
		height: 100%;
		width: 1rem;
	}
}

@keyframes rotateSpinner {
	to {
		transform: rotate(360deg);
	}
}

#basel-screenshot-upload {
	align-content: center;
	text-align: center;
	background-color: #dfd5cf;
	border-color: #d6c6bc;
	height: 100%;
	padding: 2rem;
}

.basel-canvas-buttons {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.basel-feedback-popup .upload-wrapper {
	align-content: center;
	text-align: center;
	border: 1px solid #eaddd5;
	border-radius: 4px;
	background-color: rgba(255, 255, 255, 0.4);
	height: 100%;
	padding: 4rem;

	p {
		font-size: 1.5rem !important;
		margin-bottom: 0.5rem !important;
	}
}

.basel-button {
	background-color: #243363;
	border: 1px solid #243363;
	border-radius: 4px;
	color: white;
	cursor: pointer;
	font-family: "Outfit", sans-serif;
	font-size: 0.8rem;
	padding: 0.5rem 1.25rem;
	transition: opacity 0.3s ease, transform 0.3s ease;
	width: fit-content;

	&:disabled {
		background-color: #ccc;
		color: #666;
		cursor: not-allowed;
	}

	&:not(.basel-position-right-center):not(#basel-help-button):hover {
		opacity: 0.9;
		transform: translateY(-2px);
	}

	&.ghost {
		background-color: transparent;
		border: 1px solid #243363 inset;
		color: #243363;
	}
}

.basel-floating-button {
	box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	opacity: 0.8;
	position: fixed;
	right: 2rem;
	z-index: 10000;

	&:not(.basel-position-right-center) {
		bottom: 2rem;
	}

	&:hover {
		opacity: 1;
	}
}

.basel-feedback-notification {
	background-color: #f9f5f3;
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.8rem;
	opacity: 0;
	padding: 1.5rem 2.5rem;
	pointer-events: none;
	position: fixed;
	right: 2rem;
	top: 2rem;
	transition: opacity 0.5s ease;
	z-index: 10000;
}

.basel-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	backdrop-filter: blur(5px);
	background-color: rgba(0, 0, 0, 0.4);
	z-index: 9999; /* less than popup (which is 1000) */
}

.basel-feedback-popup {
	.feedback-popup-inner {
		background-color: #f9f5f3;
		border: 1px solid #eaddd5;
		border-radius: 4px;
		display: flex;
		flex-direction: column;
		gap: 1rem;
		justify-content: space-between;
		left: 50%;
		height: 80%;
		font-family: "Outfit", sans-serif;
		max-width: 1400px;
		overflow-y: scroll;
		padding: 3rem 2rem 2rem;
		position: fixed;
		top: 50%;
		transform: translate(-50%, -50%);
		width: 90%;
		z-index: 10000;

		.feedback-inner-columns {
			display: grid;
			grid-template-columns: 1fr 2fr;
			gap: 2rem;
			flex: 1;

			@screen media and (min-width: 768px) {
				grid-template-columns: 1fr 3fr;
			}

			canvas {
				border: 1px solid #eaddd5;
				border-radius: 4px;
				box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
					0 2px 4px -2px rgb(0 0 0 / 0.1);
				cursor: url("../images/pencil-solid.png") 0 32, url("../images/pencil-solid.svg") 0 32, auto;
				/* cursor: crosshair; */
				object-fit: contain;
				max-height: 580px;
				width: fit-content;
				max-width: 100%;
			}
		}

		.feedback-right-column,
		.feedback-left-column {
			display: flex;
			flex-direction: column;
			gap: 1rem;
		}

		p {
			font-family: "Outfit", sans-serif;
			font-size: 1rem;
			margin: 0;
		}

		.popup-heading {
			font-family: "Outfit", sans-serif;
			font-size: 1.25rem;
			font-weight: 600;
		}

		.instruction-overlay {
			background-color: #f9f5f3;
			gap: 2rem;
			padding: 2rem 6rem;
			position: absolute;
			display: flex;
			inset: 0;
			flex-direction: column;
			justify-content: center;
			align-content: center;
			z-index: 10002;

			.steps {
				display: grid;
				grid-template-columns: 1fr 1fr 1fr;
				gap: 5rem;
				margin: 0 auto;
				width: 80%;
				text-align: center;

				h3 {
					font-family: "Outfit";
				}

				> div {
					display: flex;
					flex-direction: column;
					gap: 1rem;

					img {
						margin-bottom: 1rem;
						width: 100%;
					}

					p {
						font-size: 0.8rem;
					}
				}
			}

			.close-help-button {
				display: block;
				margin: 3rem auto;
				/* font-size: 1.25rem; */
			}
		}
	}

	.basel-footer {
		align-items: center;
		display: flex;
		justify-content: space-between;

		.submit-container {
			display: flex;
			gap: 1rem;
		}
	}

	textarea,
	input {
		border: 1px solid #eaddd5;
		border-radius: 4px;
		font-family: "Outfit", sans-serif;
		font-size: 0.875rem;
		padding: 0.75rem;
	}

	textarea {
		min-height: 200px;
		resize: vertical;
	}

	.basel-meta-info-table {
		width: 100%;
		border-collapse: collapse;
		font-size: 0.85rem;
		font-family: "Outfit", sans-serif;
		margin-top: 1rem;
	}

	.basel-meta-info-table th,
	.basel-meta-info-table td {
		text-align: left;
		padding: 0.25rem 0.5rem;
		border-bottom: 1px solid #eaddd5;
		vertical-align: top;
	}

	.basel-meta-info-table th {
		font-weight: 600;
		color: #333;
		width: 120px;
	}

	.basel-meta-info-table td {
		color: #555;
		word-break: break-word;
	}

	.feedback-title-wrapper {
		display: flex;
		align-items: center;
		gap: 0.5rem;
	}

	.enhance-ai-button,
	.generate-ai-button {
		padding: 0.5rem 0.75rem;
		font-size: 0.75rem;
		background-color: #243363;
		border: 1px solid #243363;
		border-radius: 4px;
		color: #fff;
		font-family: "Outfit", sans-serif;
		cursor: pointer;
		margin-top: 1rem;
		text-wrap: nowrap;
		transition: background-color 0.3s ease;
	}

	.generate-ai-button {
		height: 100%;
	}

	.enhance-ai-button:disabled,
	.generate-ai-button:disabled {
		background-color: #ddd;
		border-color: #bbb;
		color: #aaa;
		cursor: not-allowed;
	}

	@media (max-width: 600px) {
		.feedback-title-wrapper {
			flex-direction: column;
			align-items: stretch;
		}

		.enhance-ai-button,
		.generate-ai-button {
			width: 100%;
		}
	}
}

.basel-pencil-switcher {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;

	.pencil-buttons {
		align-items: center;
		display: flex;
		gap: 0.5rem;
	}
}

.basel-pencil-button {
	border: 2px solid transparent;
	border-radius: 4px;
	height: 1rem;
	width: 1rem;

	&.is-active {
		height: 1.25rem;
		width: 1.25rem;
	}

	&.red {
		border: 1px solid #ff0000;
		background: #ff0000;
	}

	&.black {
		border: 1px solid #000;
		background: #000000;
	}

	&.white {
		border: 1px solid #000;
		background: #fff;
	}

	&.blue {
		border: 1px solid #0000ff;
		background: #0000ff;
	}

	.screen-reader-label {
		position: absolute;
		left: -9999px; /* Hide visually but keep accessible */
	}
}

.basel-position-top-left {
	top: 2rem;
	left: 2rem;
	right: auto;
	bottom: auto;
}

.basel-position-top-right {
	top: 2rem;
	right: 2rem;
	left: auto;
	bottom: auto;
}

.basel-position-bottom-left {
	bottom: 2rem;
	left: 2rem;
	right: auto;
	top: auto;
}

.basel-position-bottom-right {
	bottom: 2rem;
	right: 2rem;
	left: auto;
	top: auto;
}

.basel-position-right-center {
	top: 45%;
	right: 0;
	transform: rotate(-90deg) translateY(-50%);
	transform-origin: right center;
	position: fixed;
}
