/* ==========================================================================
   ProductBay — Tab Block: Frontend & Editor Styles
   =========================================================================
   These styles are loaded:
     • On the frontend via TabProductTableBlock::enqueue_assets()
     • In the block editor via BlockManager::enqueue_editor_preview_styles()
   ========================================================================== */

/* --------------------------------------------------------------------------
   Block Wrapper
   -------------------------------------------------------------------------- */
.productbay-tabs-block {
	font-family: inherit;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Tab Navigation Bar
   -------------------------------------------------------------------------- */
.productbay-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	padding: 0;
	margin: 0 0 0 0;
	border-bottom: 2px solid #e5e7eb;
	list-style: none;
}

/* --------------------------------------------------------------------------
   Tab Buttons
   -------------------------------------------------------------------------- */
.productbay-tab-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	margin: 0;
	margin-bottom: -2px; /* Overlap the nav border-bottom */
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	border-radius: 4px 4px 0 0;
	cursor: pointer;
	font-size: 15px;
	font-weight: 500;
	color: #6b7280;
	line-height: 1.2;
	white-space: nowrap;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	outline: none;
}

.productbay-tab-button:hover {
	color: #111827;
	background-color: #f3f4f6;
}

/* Keyboard focus ring — visible only for keyboard users */
.productbay-tab-button:focus-visible {
	box-shadow: inset 0 0 0 2px #4f46e5;
	border-radius: 4px 4px 0 0;
	z-index: 10;
}

/* Active / selected tab */
.productbay-tab-button.is-active {
	color: #4f46e5;
	border-bottom-color: #4f46e5;
	font-weight: 600;
	background-color: #f5f3ff;
}

.productbay-tab-button.is-active::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	right: 0;
	height: 2px;
	background: #4f46e5;
	border-radius: 2px;
}

/* Subtle hover when already active */
.productbay-tab-button.is-active:hover {
	background-color: #ede9fe;
}

/* --------------------------------------------------------------------------
   Tab Panels
   -------------------------------------------------------------------------- */
.productbay-tab-panel {
	display: block;
	padding-top: 4px;
	animation: pb-tab-fade-in 0.18s ease;
}

.productbay-tab-panel[hidden] {
	display: none !important;
	animation: none;
}

/* Subtle fade-in when a tab becomes active */
@keyframes pb-tab-fade-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
