/* PowerTable – WordPress Native Styling */

/* Wrapper */
.ptwc-editor-wrap {
	margin: 20px 20px 0 0;
	max-width: 100%;
}

.ptwc-editor-header {
	margin-bottom: 20px;
}

.ptwc-editor-header h1 {
	font-size: 23px;
	font-weight: 400;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	margin: 0;
	line-height: 1.3;
	color: #1d2327;
}

.ptwc-editor-header h1 .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #2271b1;
}

.ptwc-subtitle {
	margin-top: 5px;
	color: #646970;
	font-size: 13px;
	margin-left: 38px;
}

.ptwc-table-container {
	background: #fff;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
	padding: 0;
	margin-top: 10px;
}

/* DataTables Overrides to match WP */
.dataTables_wrapper {
	padding: 12px;
}

.dataTables_length,
.dataTables_filter {
	margin-bottom: 15px;
}

.dataTables_length select,
.dataTables_filter input {
	height: 30px;
	line-height: normal;
	font-size: 13px;
	color: #2c3338;
	border-color: #8c8f94;
	box-shadow: none;
	border-radius: 3px;
	padding: 0 8px;
	background-color: #fff;
	border-width: 1px;
	border-style: solid;
}

.dataTables_filter input:focus,
.dataTables_length select:focus {
	color: #0c0d0e;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: 2px solid transparent;
}

/* Table Styling - wp-list-table imitation */
table.dataTable.display {
	border-collapse: collapse;
	width: 100%;
	border: none;
	box-shadow: none;
	margin: 0 !important;
}

table.dataTable thead th {
	border-bottom: 1px solid #c3c4c7;
	border-top: none;
	border-left: none;
	border-right: none;
	padding: 12px;
	background: #f0f0f1;
	/* WP header gray */
	color: #0c0d0e;
	font-size: 14px;
	font-weight: normal;
	/* WP headers aren't bold usually, or 500 */
	text-align: left;
	vertical-align: middle;
}

table.dataTable thead th .dashicons {
	vertical-align: text-bottom;
}

table.dataTable tbody td {
	padding: 8px 12px;
	vertical-align: top;
	font-size: 14px;
	color: #50575e;
	border-bottom: 1px solid #c3c4c7;
	/* Standard row divider */
	border-top: none;
	border-left: none;
	/* Remove vertical borders */
	border-right: none;
}

/* Striping */
table.dataTable.display tbody tr:nth-child(odd) {
	background-color: #f6f7f7;
}

table.dataTable.display tbody tr:nth-child(even) {
	background-color: #fff;
}

table.dataTable.display tbody tr:hover {
	background-color: #f0f6fc;
	/* WP hover blue tint */
}

/* Parent/Child Distinction */

/* Parent Rows */
tr.ptwc-row-variable td {
	background-color: #fff !important;
	/* Force clean bg for parent */
	font-weight: 500;
}

/* Variation Rows */
tr.ptwc-row-variation {
	background-color: #fcfcfc !important;
}

tr.ptwc-row-variation td {
	font-size: 13px;
	color: #646970;
	border-bottom: 1px solid #e5e5e5;
	/* Lighter border for children */
}

/* Indent the ID or Name column for variations */
/* Let's indent the first column (ID) and Name */
tr.ptwc-row-variation td.ptwc-field-id {
	padding-left: 20px;
	position: relative;
	border-left: 4px solid transparent;
}

/* Simplified Tree approach: Just explicit indentation */
/* Simplified Tree approach: Just explicit indentation */
tr.ptwc-row-variation td.ptwc-field-id {
	box-shadow: inset 3px 0 0 #c3c4c7;
	/* A subtle left marker instead of tree */
	padding-left: 15px;
}

tr.ptwc-row-variation td.ptwc-field-post_title {
	padding-left: 20px;
}

tr.ptwc-row-variation td.ptwc-field-post_title:before {
	content: "— ";
	color: #8c8f94;
}

/* Inputs */
.ptwc-inline-input {
	min-height: 30px;
	padding: 0 8px;
	line-height: 2;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	box-shadow: 0 0 0 transparent;
	transition: box-shadow .1s linear;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.ptwc-inline-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: 2px solid transparent;
}

/* Badges - Simplified */
.ptwc-badge {
	background: transparent;
	color: #646970;
	padding: 0;
	border: none;
	font-weight: normal;
	box-shadow: none;
}

.ptwc-badge-variable {
	background: #e5e5e5;
	color: #1d2327;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 11px;
}

.ptwc-badge-variation {
	font-style: italic;
	color: #8c8f94;
}

/* Edit Icon */
.ptwc-edit-icon {
	float: right;
	color: #2271b1;
	visibility: hidden;
}

td:hover .ptwc-edit-icon {
	visibility: visible;
}

/* Pagination */
.dataTables_paginate .paginate_button {
	box-sizing: border-box;
	display: inline-block;
	min-width: 30px;
	min-height: 30px;
	margin: 0 2px;
	padding: 0 4px;
	font-size: 13px;
	line-height: 28px;
	text-align: center;
	border-radius: 3px;
	border: 1px solid #c3c4c7;
	background: #f6f7f7;
	vertical-align: top;
	cursor: pointer;
	text-decoration: none;
	color: #2c3338 !important;
}

.dataTables_paginate .paginate_button:hover {
	border-color: #2271b1;
	background: #f0f6fc;
	color: #0a4b78 !important;
}

.dataTables_paginate .paginate_button.current {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff !important;
}

.dataTables_paginate .paginate_button.disabled {
	opacity: 0.5;
	cursor: default;
	border-color: #dcdcde;
}

/* Editing States */
td.ptwc-editing {
	background-color: #fff !important;
	padding: 0;
}

td.ptwc-editing .ptwc-inline-input {
	border: 1px solid #2271b1;
	border-radius: 0;
	height: 100%;
}