/* SD Table Widget Styles */

.sd-table-wrapper {
	position: relative;
	width: 100%;
}

.sd-table-scroll {
	overflow-x: visible;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
}

.sd-table {
	width: 100%;
	border-collapse: collapse;
}

.sd-table th,
.sd-table td {
	text-align: left;
	vertical-align: top;
	border-style: solid;
	border-width: 1px;
	font-variant-emoji: text;
	background-color: transparent;
}

.sd-table th {
	font-weight: 600;
}

/* Sticky First Column — Mobile */
@media (max-width: 767px) {
	[data-sticky-column="yes"][data-sticky-breakpoint="mobile"] .sd-table-scroll {
		overflow-x: auto;
	}
	[data-sticky-column="yes"][data-sticky-breakpoint="mobile"] .sd-table__col--1 {
		position: sticky;
		left: 0;
		z-index: 2;
	}
}

/* Sticky First Column — Tablet */
@media (max-width: 1024px) {
	[data-sticky-column="yes"][data-sticky-breakpoint="tablet"] .sd-table-scroll {
		overflow-x: auto;
	}
	[data-sticky-column="yes"][data-sticky-breakpoint="tablet"] .sd-table__col--1 {
		position: sticky;
		left: 0;
		z-index: 2;
	}
}

/* Sticky First Column — Always */
[data-sticky-column="yes"][data-sticky-breakpoint="always"] .sd-table-scroll {
	overflow-x: auto;
}
[data-sticky-column="yes"][data-sticky-breakpoint="always"] .sd-table__col--1 {
	position: sticky;
	left: 0;
	z-index: 2;
}

/* Sticky column shadow */
[data-sticky-shadow="yes"] .sd-table__col--1 {
	position: relative;
}
[data-sticky-shadow="yes"] .sd-table__col--1::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	right: -4px;
	width: 4px;
	box-shadow: inset 4px 0 4px -4px rgba(0, 0, 0, 0.15);
	pointer-events: none;
}

/* Hover on sticky column cell — inherits from Elementor selectors */

/* Info Tooltip Button */
.sd-table__info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: none;
	background: #0073aa;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	font-style: italic;
	font-family: Georgia, serif;
	line-height: 1;
	cursor: pointer;
	margin-left: 6px;
	padding: 0;
	position: relative;
	vertical-align: middle;
	flex-shrink: 0;
}

.sd-table__info:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Tooltip popup */
.sd-table__tooltip {
	display: none;
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: normal;
	font-style: normal;
	font-family: inherit;
	max-width: 200px;
	width: max-content;
	white-space: normal;
	text-align: left;
	z-index: 9999;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.sd-table__tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: #333;
}

/* Show tooltip on hover, focus, or aria-expanded */
.sd-table__info:hover .sd-table__tooltip,
.sd-table__info:focus .sd-table__tooltip,
.sd-table__info[aria-expanded="true"] .sd-table__tooltip {
	display: block;
}
