/* Frontend styles for Amaze Image Tabs – polygon tab backgrounds */
.wp-block-amaze-image-tabs.amaze-image-tabs {
	margin: 1.5em 0;
}

.amaze-image-tabs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em;
	margin: 0 0 1em;
	padding: 0;
	list-style: none;
}

/* Tab button: polygon shape (left) + arrow (right). Polygon scales; arrow stays full size to avoid gap. */
.amaze-image-tabs__tab {
	--amaze-scale: 0.75;
	--amaze-tab-width: calc(179px * var(--amaze-scale));
	--amaze-tab-height: calc(196px * var(--amaze-scale));
	--amaze-arrow-width: 23px;
	--amaze-arrow-height: 23px;
	display: inline-flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 0;
	width: calc(var(--amaze-tab-width) + var(--amaze-arrow-width));
	height: var(--amaze-tab-height);
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	background: transparent;
	border: none;
	cursor: pointer;
	box-sizing: content-box;
}

.amaze-image-tabs__tab:focus {
	outline: none;
}

/* Polygon image – only this span has the bg; arrow sits to the right of it */
.amaze-image-tabs__tab-shape {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--amaze-tab-width);
	height: var(--amaze-tab-height);
	flex-shrink: 0;
	background: url('../../poly.svg') no-repeat center;
	background-size: 100% 100%;
	transition: background-image 0.2s ease;
}

.amaze-image-tabs__tab:hover .amaze-image-tabs__tab-shape,
.amaze-image-tabs__tab[aria-selected="true"] .amaze-image-tabs__tab-shape {
	background-image: url('../../poly-over.svg');
}

/* Label centered inside the polygon shape */
.amaze-image-tabs__tab-label {
	text-align: center;
	line-height: 1.3;
	pointer-events: none;
	box-sizing: border-box;
	padding: 0 0.35em;
	max-width: 85%;
	font-size: calc(1em * var(--amaze-scale));
	transition: color 0.2s ease;
}

/* Active/hover label color (set via --amaze-label-color-active on the tab button) */
.amaze-image-tabs__tab:hover .amaze-image-tabs__tab-label,
.amaze-image-tabs__tab[aria-selected="true"] .amaze-image-tabs__tab-label {
	color: var(--amaze-label-color-active, inherit) !important;
}

/* Arrow outside the polygon, to the right, no gap, vertically centered */
.amaze-image-tabs__arrow {
	display: inline-block;
	width: var(--amaze-arrow-width);
	height: var(--amaze-arrow-height);
	flex-shrink: 0;
	background: url('../../Arrow%201.svg') no-repeat center;
	background-size: 100% 100%;
}

/* Last tab: no arrow */
.amaze-image-tabs__tab:last-child {
	width: var(--amaze-tab-width);
}
.amaze-image-tabs__tab:last-child .amaze-image-tabs__arrow {
	display: none;
}

.amaze-image-tabs__panels {
	margin: 0;
}

.amaze-image-tabs__panel {
	margin: 0;
	padding: 1.25em;
	background: #fff;
	border: 2px solid #CCECF8;
	border-radius: 15px;
}

.amaze-image-tabs__panel[hidden] {
	display: none;
}

.amaze-image-tab__content {
	margin: 0;
}

.amaze-image-tabs--empty {
	padding: 1em;
	background: #f5f5f5;
	border: 1px dashed #ccc;
	color: #666;
}
