/* ==========================================================================
   GBC Linked Tyres block — frontend + editor styles
   ========================================================================== */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.gbc-linked-tyres {
	margin-block: 2rem;
}

/* ── Empty / notice ───────────────────────────────────────────────────────── */
.gbc-linked-tyres__empty {
	font-style: italic;
	color: #666;
}

/* "velgen zoeker" (link to the shop page) — clearly visible as a link. */
.gbc-linked-tyres__empty a {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.gbc-linked-tyres__empty a:hover,
.gbc-linked-tyres__empty a:focus-visible {
	text-decoration-thickness: 2px;
}

/* ── List ─────────────────────────────────────────────────────────────────── */
.gbc-linked-tyres__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* ── Single item ──────────────────────────────────────────────────────────── */
.gbc-linked-tyres__item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1rem;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #fff;
	transition: box-shadow 0.15s ease;
}

.gbc-linked-tyres__item:hover {
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.1 );
}

/* ── Image ────────────────────────────────────────────────────────────────── */
.gbc-linked-tyres__image-link {
	flex-shrink: 0;
}

.gbc-linked-tyres__image {
	display: block;
	width: 120px;
	height: 120px;
	object-fit: contain;
}

/* ── Details ──────────────────────────────────────────────────────────────── */
.gbc-linked-tyres__details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.gbc-linked-tyres__title {
	font-size: 1rem;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	line-height: 1.3;
}

.gbc-linked-tyres__title:hover {
	text-decoration: underline;
}

/* ── Specs definition list ────────────────────────────────────────────────── */
.gbc-linked-tyres__specs {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.gbc-linked-tyres__spec {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.85rem;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: 4px;
	padding: 0.25rem 0.5rem;
}

.gbc-linked-tyres__spec dt {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	font-weight: 400;
	color: #555;
	white-space: nowrap;
}

.gbc-linked-tyres__spec dt::after {
	content: ':';
}

.gbc-linked-tyres__spec dd {
	margin: 0;
	font-weight: 600;
	color: #333;
}

.gbc-linked-tyres__spec-icon {
	flex-shrink: 0;
	width: 0.9em;
	height: 0.9em;
	vertical-align: -0.1em;
	opacity: 0.65;
}

/* ── Results header ───────────────────────────────────────────────────────── */
.gbc-linked-tyres__results-header {
	margin-block-end: 1rem;
	font-size: 1rem;
	color: #333;
}

/* ── Debug panel ──────────────────────────────────────────────────────────── */
.gbc-linked-tyres__debug {
	margin-block-end: 1.5rem;
	padding: 1rem;
	border: 2px dashed #f0a000;
	border-radius: 6px;
	background: #fffbf0;
	font-size: 0.8125rem;
}

.gbc-linked-tyres__debug > strong {
	display: block;
	margin-block-end: 0.75rem;
	font-size: 0.875rem;
	color: #b36b00;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.gbc-linked-tyres__debug-table {
	border-collapse: collapse;
	width: 100%;
}

.gbc-linked-tyres__debug-table th,
.gbc-linked-tyres__debug-table td {
	padding: 0.3rem 0.6rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #f0e0b0;
}

.gbc-linked-tyres__debug-table th {
	width: 11rem;
	font-weight: 600;
	color: #7a5000;
	white-space: nowrap;
}

/* ── Editor placeholder ───────────────────────────────────────────────────── */
.gbc-linked-tyres--editor .gbc-linked-tyres__editor-placeholder {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 1.25rem;
	border: 2px dashed #c0c0c0;
	border-radius: 6px;
	background: #fafafa;
	color: #555;
	font-size: 0.9rem;
}

.gbc-linked-tyres--editor .dashicons {
	font-size: 1.4rem;
	width: auto;
	height: auto;
	color: #777;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media ( max-width: 480px ) {
	.gbc-linked-tyres__item {
		flex-direction: column;
	}

	.gbc-linked-tyres__image {
		width: 100%;
		height: auto;
		max-height: 200px;
	}
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.gbc-lt-tabs__nav {
	display: flex;
	gap: 0;
	border-bottom: 1px solid var(--theme-palette-color-5);
	margin-block-end: 1.25rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.gbc-lt-tabs__tab {
	position: relative;
	padding: 0.6rem 1.25rem;
	border: none;
	background: transparent;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #6b7280;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.18s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	line-height: 1.4;
}

.gbc-lt-tabs__tab:hover {
	color: #111827;
}

.gbc-lt-tabs__tab::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	right: 0;
	height: 2px;
	background: currentColor;
	transform: scaleX( 0 );
	transition: transform 0.18s ease;
}

.gbc-lt-tabs__tab.is-active {
	color: #000;
  	background: var(--theme-palette-color-1);
}

.gbc-lt-tabs__tab.is-active::after {
	transform: scaleX( 1 );
}

.gbc-lt-tabs__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4rem;
	height: 1.4rem;
	padding: 0 0.35rem;
	border-radius: 9999px;
	background: var(--theme-palette-color-1);
	color: var(--theme-palette-color-4);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	transition: background 0.18s ease, color 0.18s ease;
}

.gbc-lt-tabs__tab.is-active .gbc-lt-tabs__badge {
	background: #000000;
	color: #fff;
}

.gbc-lt-tabs__icon {
	display: inline-block;
	flex-shrink: 0;
	width: 1.2em;
	height: 1.2em;
	vertical-align: -0.125em;
}

/* ── Pricing (set of 4 tyres, VAT + milieutaks included) ──────────────────── */
.gbc-linked-tyres__pricing {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
	margin-top: 0.35rem;
	padding-top: 0.5rem;
	border-top: 1px solid #eee;
}

.gbc-linked-tyres__pricing-label {

}

.gbc-linked-tyres__pricing-amount {
	font-weight: 700;
}

.gbc-linked-tyres__vat {
	font-size: 0.75em;
	font-weight: 400;
	margin-left: 0.25em;
	white-space: nowrap;
}

/* Ghost button: transparent, black text + border, so it stays secondary. */
.gbc-linked-tyres__choose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid #000;
    border-radius: 4px;
    background: transparent;
    color: #000;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.gbc-linked-tyres__choose:hover,
.gbc-linked-tyres__choose:focus-visible {
    background: rgba( 0, 0, 0, 0.06 );
}

.gbc-linked-tyres__choose:active {
    transform: translateY( 1px );
}

/* Added to the form: the button stays solid black with the "added" label. */
.gbc-linked-tyres__choose.is-added,
.gbc-linked-tyres__choose.is-added:hover,
.gbc-linked-tyres__choose.is-added:focus-visible {
    background: #000;
    border-color: #000;
    color: #fff;
}

.gbc-linked-tyres__choose.is-added:active {
    transform: none;
}

.gbc-linked-tyres__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.25rem;
}

.gbc-linked-tyres__toast {
	position: fixed;
	left: 50%;
	/* Keep clear of the viewport edge and of a fixed bottom bar (safe area). */
	bottom: calc( 1.5rem + env( safe-area-inset-bottom, 0px ) );
	/* Above sticky headers and theme/plugin modals. */
	z-index: 2147483000;
	max-width: min( 90vw, 32rem );
	max-height: calc( 100vh - 4rem );
	overflow-y: auto;
	padding: 0.85rem 1.25rem;
	border-radius: 6px;
	background: #111827;
	color: #fff;
	font-size: 0.9375rem;
	line-height: 1.4;
	box-shadow: 0 6px 24px rgba( 0, 0, 0, 0.25 );
	opacity: 0;
	visibility: hidden;
	transform: translate( -50%, 1rem );
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	pointer-events: none;
}

.gbc-linked-tyres__toast.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translate( -50%, 0 );
}

@media ( prefers-reduced-motion: reduce ) {
	.gbc-linked-tyres__toast {
		transition: none;
	}
}

