/* ==========================================================================
   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;
}

/* ── 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-6);
	color: var(--theme-palette-color-2);
	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;
}
