/**
 * Statistics Charts module for Joomla 5 / 6 -- front end styles.
 *
 * @copyright  (C) Laserworld
 * @license    GNU General Public License version 2 or later
 */

.jagc-module {
	max-width: 100%;
}

.jagc-canvas {
	position: relative;
	max-width: 100%;
	overflow: hidden;
}

.jagc-svg {
	display: block;
	overflow: visible;
	-webkit-user-select: none;
	user-select: none;
}

.jagc-intro {
	margin-top: .5rem;
}

/* -- interaction ------------------------------------------------------- */

.jagc-bar,
.jagc-slice,
.jagc-region,
.jagc-marker {
	transition: opacity .15s ease-out, filter .15s ease-out;
}

.jagc-bar.is-hot,
.jagc-slice.is-hot,
.jagc-marker.is-hot {
	filter: brightness(1.12);
}

.jagc-region.is-hot {
	filter: brightness(.92);
	stroke-width: 1.1;
}

.jagc-point {
	pointer-events: none;
}

.jagc-hit {
	cursor: default;
}

.jagc-legend-item.is-clickable {
	cursor: pointer;
}

.jagc-legend-item.is-clickable:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.jagc-legend-item.is-off .jagc-legend-swatch {
	opacity: .3;
}

.jagc-legend-item.is-off .jagc-legend-text {
	opacity: .45;
	text-decoration: line-through;
}

/* -- tooltip ----------------------------------------------------------- */

.jagc-tooltip {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 20;
	min-width: 4rem;
	max-width: 18rem;
	padding: .4rem .55rem;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
	pointer-events: none;
	opacity: 0;
	transition: opacity .12s ease-out;
	line-height: 1.45;
	white-space: nowrap;
}

.jagc-tooltip.is-visible {
	opacity: 1;
}

.jagc-tip-head {
	font-weight: 700;
	margin-bottom: .15rem;
}

.jagc-tip-row {
	display: flex;
	align-items: center;
	gap: .4rem;
}

.jagc-tip-dot {
	display: inline-block;
	width: .6em;
	height: .6em;
	border-radius: 2px;
	flex: none;
}

.jagc-tip-value {
	margin-left: auto;
	font-weight: 700;
	padding-left: .75rem;
}

/* -- messages and the data table --------------------------------------- */

.jagc-message {
	padding: 1rem;
	border: 1px dashed rgba(0, 0, 0, .2);
	border-radius: 4px;
	color: #6c757d;
	text-align: center;
}

.jagc-admin-notice {
	margin-top: .5rem;
	padding: .5rem .75rem;
	border-left: 3px solid #c8531f;
	background: rgba(200, 83, 31, .08);
	font-size: .875em;
}

.jagc-admin-notice p {
	margin: 0;
}

.jagc-table {
	width: 100%;
	margin-top: .75rem;
	border-collapse: collapse;
	font-size: .9em;
}

.jagc-table caption {
	text-align: left;
	padding-bottom: .35rem;
	font-weight: 700;
}

.jagc-table th,
.jagc-table td {
	padding: .3rem .5rem;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
	text-align: right;
}

.jagc-table thead th:first-child,
.jagc-table tbody th {
	text-align: left;
}

.jagc-table thead th {
	border-bottom-width: 2px;
}

/* Kept in the accessibility tree, kept out of the picture. */
.jagc-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media print {
	.jagc-tooltip {
		display: none;
	}

	.jagc-table.jagc-visually-hidden {
		position: static !important;
		width: auto;
		height: auto;
		margin: 0;
		overflow: visible;
		clip: auto;
		white-space: normal;
	}
}
