/**
 * Product Table Frontend Styles
 */

.se-product-table {
	--se-pt-text: #1c244b;
	--se-pt-muted: rgba(28, 36, 75, 0.66);
	--se-pt-accent: #3791c5;
	--se-pt-border: rgba(28, 36, 75, 0.08);
	--se-pt-surface: rgba(255, 255, 255, 0.62);
	--se-pt-surface-strong: rgba(255, 255, 255, 0.82);
	margin: 0;
	color: var(--se-pt-text);
}

/* Tabs */
.se-pt-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
}

.se-pt-tab {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	text-align: center !important;
	padding: 12px 20px !important;
	color: var(--se-pt-text) !important;
	cursor: pointer !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease !important;
	text-decoration: none !important;
	line-height: 1.1 !important;
}

.se-pt-tab:hover {
	color: var(--se-pt-accent) !important;
}

.se-pt-tab.active {
	color: var(--se-pt-text) !important;
	box-shadow: 0 8px 20px rgba(55, 145, 197, 0.12), inset 0 0 0 1px rgba(55, 145, 197, 0.18) !important;
}

/* Content */
.se-pt-content {
	background: transparent;
	padding: 0;
	border: none;
}

.se-pt-tab-content {
	display: none;
}

.se-pt-tab-content.active {
	display: block;
}

.se-pt-table-wrap {
	overflow: hidden;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.44);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Table */
.se-pt-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin-bottom: 20px;
	border: 0 !important;
	outline: 0;
}

.se-pt-table thead {
	background: transparent;
}

.se-pt-table thead tr,
.se-pt-table tbody tr,
.se-pt-table th,
.se-pt-table td {
	border-left: 0 !important;
	border-right: 0 !important;
	border-top: 0 !important;
	outline: 0;
	box-shadow: none;
}

.se-pt-table th {
	padding: 16px 18px;
	text-align: left;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(28, 36, 75, 0.62);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(246, 249, 255, 0.5));
	border-bottom: 1px solid var(--se-pt-border);
}

.se-pt-table tbody tr {
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.se-pt-table tbody tr:hover {
	background: rgba(55, 145, 197, 0.06);
}

.se-pt-table tbody tr.se-pt-row--issue {
	background: rgba(255, 247, 229, 0.8);
}

.se-pt-table tbody tr.se-pt-row--issue:hover {
	background: rgba(255, 239, 204, 0.95);
}

.se-pt-table td {
	padding: 18px;
	vertical-align: middle;
	border-bottom: 1px solid var(--se-pt-border);
	background: rgba(255, 255, 255, 0.46);
}

.se-pt-table th + th,
.se-pt-table td + td {
	border-left: 0 !important;
}

.se-pt-table tbody tr:last-child td {
	border-bottom: 0;
}

.se-pt-row--empty td {
	padding: 22px 18px;
}

/* Columns */
.col-checkbox {
	width: 40px;
	text-align: center;
}

.col-checkbox input[type="checkbox"] {
	cursor: pointer;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--se-pt-accent);
}

.col-model {
	width: 116px;
}

.col-model img {
	display: block;
	width: 88px;
	height: 88px;
	object-fit: cover;
	border-radius: 16px;
	border: 1px solid rgba(55, 145, 197, 0.12);
	box-shadow: 0 10px 22px rgba(37, 56, 88, 0.08);
}

.col-name {
	width: 40%;
}

.col-name a {
	color: var(--se-pt-text);
	text-decoration: none;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.35;
}

.col-name a:hover {
	color: var(--se-pt-accent);
}

.variation-attributes {
	color: var(--se-pt-muted);
	font-weight: 500;
	font-size: 12px;
	margin-top: 8px;
	display: block;
	line-height: 1.5;
}

.se-pt-variation {
	background: rgba(246, 249, 255, 0.5);
}

.se-pt-variation:hover {
	background: rgba(55, 145, 197, 0.08);
}

.col-number {
	width: 20%;
	color: var(--se-pt-muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	font-weight: 600;
}

.col-quantity {
	width: 20%;
}

/* Quantity Input */
.quantity-input {
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: flex-end;
}

.se-pt-quantity {
	width: 72px;
	min-width: 72px;
	height: 44px;
	padding: 0 8px;
	box-sizing: border-box;
	appearance: textfield;
	-moz-appearance: textfield;
	-webkit-appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 12px;
	text-align: center;
	line-height: 44px;
	font-size: 14px;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.92);
	color: var(--se-pt-text);
	opacity: 1;
	transition: all 0.3s ease;
	font-family: inherit;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.se-pt-quantity::-webkit-outer-spin-button,
.se-pt-quantity::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.se-pt-quantity:focus {
	outline: none;
	border-color: rgba(55, 145, 197, 0.4);
	box-shadow: 0 0 0 4px rgba(55, 145, 197, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.se-pt-add-to-cart {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	text-align: center !important;
	padding: 12px 18px !important;
	color: var(--se-pt-text) !important;
	cursor: pointer !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease !important;
	white-space: nowrap !important;
	text-decoration: none !important;
	line-height: 1.1 !important;
}

.se-pt-add-to-cart:hover {
	color: var(--se-pt-accent) !important;
}

.se-pt-add-to-cart:active {
	transform: translateY(0) !important;
}

.se-pt-add-to-cart:disabled {
	background: rgba(225, 229, 236, 0.7) !important;
	color: rgba(28, 36, 75, 0.42) !important;
	cursor: not-allowed !important;
	border-color: rgba(225, 229, 236, 0.7) !important;
	box-shadow: none !important;
}

.out-of-stock {
	display: inline-flex;
	align-items: center;
	padding: 10px 12px;
	border-radius: 999px;
	background: rgba(214, 54, 56, 0.08);
	color: #d63638;
	font-size: 13px;
	font-weight: 700;
}

.se-pt-status {
	display: inline-flex;
	align-items: center;
	padding: 10px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.se-pt-status--warning {
	background: rgba(214, 140, 0, 0.12);
	color: #9a5f00;
}

.se-pt-empty-state {
	display: grid;
	gap: 6px;
	padding: 18px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.58);
}

.se-pt-empty-state strong {
	color: var(--se-pt-text);
	font-size: 15px;
}

.se-pt-empty-state span {
	color: var(--se-pt-muted);
	font-size: 14px;
	line-height: 1.5;
}

/* Actions */
.se-pt-actions {
	margin-top: 24px;
	padding-top: 0;
	border-top: none;
	text-align: right;
}

.se-pt-add-selected {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	text-align: center !important;
	padding: 14px 22px !important;
	color: var(--se-pt-text) !important;
	cursor: pointer !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease !important;
	text-decoration: none !important;
	line-height: 1.1 !important;
}

.se-pt-add-selected:hover {
	color: var(--se-pt-accent) !important;
}

.se-pt-add-selected:active {
	transform: translateY(0) !important;
}

.se-pt-add-selected:disabled {
	background: rgba(225, 229, 236, 0.7) !important;
	color: rgba(28, 36, 75, 0.42) !important;
	cursor: not-allowed !important;
	border-color: rgba(225, 229, 236, 0.7) !important;
	box-shadow: none !important;
}

.se-product-table p {
	margin: 0;
}

.se-pt-tab-content > p {
	padding: 20px;
	border-radius: 18px;
	background: var(--se-pt-surface);
	color: var(--se-pt-muted);
	font-weight: 600;
}

/* Responsive */
@media (max-width: 1100px) {
	.se-pt-table th,
	.se-pt-table td {
		padding: 14px;
	}

	.quantity-input {
		flex-direction: column;
		align-items: stretch;
		justify-content: center;
	}

	.se-pt-quantity,
	.se-pt-add-to-cart {
		width: 100%;
	}
}

@media (max-width: 768px) {
	.se-pt-tabs {
		flex-direction: column;
	}

	.se-pt-tab {
		width: 100%;
		text-align: center;
	}

	.se-product-table {
		padding: 18px;
		border-radius: 18px;
	}

	.se-pt-table-wrap {
		overflow-x: auto;
	}

	.se-pt-table {
		min-width: 720px;
		margin-bottom: 16px;
	}

	.col-model {
		width: 84px;
	}

	.col-model img {
		width: 68px;
		height: 68px;
	}

	.se-pt-actions {
		text-align: left;
	}

	.se-pt-add-selected {
		width: 100%;
	}
}
