/* Tooltip Styles */
.tooltip-container {
	position: relative;
	display: inline-block;
}

.tooltip {
	position: fixed;
	z-index: 1000;
	padding: 0.5rem 0.75rem;
	border-radius: 0.375rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	max-width: 240px;
	width: max-content;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease-out, transform 0.15s ease-out;
	transform: translateY(5px);
	backdrop-filter: blur(4px);
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tooltip::after {
	content: '';
	position: absolute;
	width: 0;
	height: 0;
	border: 6px solid transparent;
	pointer-events: none;
}

/* Light Theme */
.light-theme .tooltip {
	background-color: rgba(255, 255, 255, 0.95);
	color: var(--text-light);
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.light-theme .tooltip::after {
	border-top-color: rgba(255, 255, 255, 0.95);
}

/* Dark Theme */
.dark-theme .tooltip {
	background-color: rgba(30, 30, 30, 0.95);
	color: var(--text-dark);
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark-theme .tooltip::after {
	border-top-color: rgba(30, 30, 30, 0.95);
}

/* Position Styles */
.tooltip.top {
	transform: translateX(-50%) translateY(calc(-100% - 12px));
}

.tooltip.top::after {
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-bottom-width: 0;
}

.tooltip.bottom {
	transform: translateX(-50%) translateY(12px);
}

.tooltip.bottom::after {
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-top-width: 0;
	border-bottom-color: inherit;
}

.tooltip.left {
	transform: translateX(calc(-100% - 12px)) translateY(-50%);
}

.tooltip.left::after {
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	border-right-width: 0;
	border-left-color: inherit;
}

.tooltip.right {
	transform: translateX(12px) translateY(-50%);
}

.tooltip.right::after {
	right: 100%;
	top: 50%;
	transform: translateY(-50%);
	border-left-width: 0;
	border-right-color: inherit;
}

/* Active State */
.tooltip-container:hover .tooltip {
	opacity: 1;
	transform: translateX(-50%) translateY(calc(-100% - 12px));
}

.tooltip-container:hover .tooltip.bottom {
	transform: translateX(-50%) translateY(12px);
}

.tooltip-container:hover .tooltip.left {
	transform: translateX(calc(-100% - 12px)) translateY(-50%);
}

.tooltip-container:hover .tooltip.right {
	transform: translateX(12px) translateY(-50%);
}

/* Mobile behavior */
@media (max-width: 768px) {
	.tooltip {
		display: none;
	}
}