/* TFD Order Items CSV – Admin styles */

/* Field list (sortable) */
#s66a-fields-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 860px;
}

#s66a-fields-list .s66a-field-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid #dcdcde;
	margin-bottom: -1px;
	cursor: default;
}

#s66a-fields-list .s66a-field-row:first-child {
	border-radius: 4px 4px 0 0;
}

#s66a-fields-list .s66a-field-row:last-child {
	border-radius: 0 0 4px 4px;
	margin-bottom: 0;
}

#s66a-fields-list .s66a-field-row.ui-sortable-helper {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	z-index: 100;
}

.s66a-field-handle {
	cursor: grab;
	color: #999;
	flex-shrink: 0;
	font-size: 18px;
	width: 20px;
}

.s66a-field-handle:active {
	cursor: grabbing;
}

#s66a-fields-list .s66a-field-row input[type="checkbox"] {
	flex-shrink: 0;
	margin: 0;
	width: 18px;
	height: 18px;
}

#s66a-fields-list .s66a-field-key {
	color: #666;
	font-size: 12px;
	font-family: monospace;
	min-width: 200px;
	flex-shrink: 0;
}

#s66a-fields-list .s66a-field-info {
	font-size: 14px;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: #2271b1;
	cursor: help;
	opacity: 0.7;
	margin-left: -6px;
}

#s66a-fields-list .s66a-field-info:hover {
	opacity: 1;
}

#s66a-fields-list .s66a-field-row input[type="text"] {
	flex: 1;
}

/* Status badge */
.s66a-status-active {
	display: inline-block;
	padding: 2px 8px;
	background: #d1fad7;
	color: #0a6e20;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
}

.s66a-status-inactive {
	display: inline-block;
	padding: 2px 8px;
	background: #fce8e8;
	color: #b32d2e;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
}

/* Settings card */
.s66a-settings-card {
	background: #fff;
	border: 1px solid #dcdcde;
	padding: 16px 20px;
	max-width: 860px;
	margin-bottom: 20px;
}

/* Email checkbox grid */
.s66a-email-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 8px;
	margin: 8px 0;
}

.s66a-email-grid label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	background: #f9f9f9;
	border: 1px solid #e5e5e5;
	border-radius: 3px;
	cursor: pointer;
}

.s66a-email-grid label:hover {
	background: #f0f0f1;
}

/* Section header */
.s66a-section-label {
	font-weight: 600;
	font-size: 13px;
	color: #1d2327;
	margin: 0 0 8px 0;
}

/* Separator radio group */
.s66a-radio-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.s66a-radio-group label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

/* ── Profile cards ────────────────────────────────────────── */
.s66a-profile-card {
	background: #fff;
	border: 1px solid #dcdcde;
	margin-bottom: 8px;
	border-radius: 3px;
}

.s66a-profile-card-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	border-bottom: 1px solid #f0f0f1;
}

.s66a-profile-card-header strong {
	font-size: 14px;
	min-width: 160px;
}

.s66a-profile-emails {
	flex: 1;
	color: #666;
	font-size: 13px;
}

.s66a-profile-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.s66a-profile-card-body {
	padding: 8px 16px;
	font-size: 12px;
	color: #777;
}

/* ── Log table ───────────────────────────────────────────── */
.s66a-log-available {
	color: #0a6e20;
	font-weight: 600;
}

.s66a-log-deleted {
	color: #999;
}

/* ── CSV preview table ───────────────────────────────────── */
.s66csv-preview {
	font-size: 12px;
	font-family: monospace;
	white-space: nowrap;
}

.s66csv-preview th {
	background: #f0f0f1;
	position: sticky;
	top: 0;
}

.s66csv-preview td, .s66csv-preview th {
	padding: 4px 10px;
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Profile form sections ───────────────────────────────── */
.s66a-profile-section {
	background: #fff;
	border: 1px solid #dcdcde;
	padding: 16px 20px;
	max-width: 860px;
	margin-bottom: 16px;
}

.s66a-profile-section h3 {
	margin-top: 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #f0f0f1;
}

/* Locked pro field rows */
#s66a-fields-list .s66a-field-locked {
	background: #f6f7f7;
	opacity: 0.75;
}

.s66a-pro-lock {
	font-size: 12px;
	width: 12px;
	height: 12px;
	color: #999;
	flex-shrink: 0;
	margin-left: -4px;
}

/* Export counter in license box */
.s66a-export-counter {
	margin-top: 12px;
	padding: 10px 14px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	font-size: 13px;
}

.s66a-export-counter .s66a-remaining-green  { color: #00a32a; font-weight: 600; }
.s66a-export-counter .s66a-remaining-orange { color: #dba617; font-weight: 600; }
.s66a-export-counter .s66a-remaining-red    { color: #d63638; font-weight: 600; }

/* ── Unified tab layout ──────────────────────────────────────────────────── */

/* Max-width wrapper for all tab content */
.s66a-tab-wrap {
	max-width: 900px;
}

/* Consistent page header row (title + action button) */
.s66a-page-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.s66a-page-header h2 {
	margin: 0;
	font-size: 1.3em;
}

/* ── Section cards (unified: same as .s66a-profile-section) ─────────────── */
/* .s66a-profile-section is the reference style; keep it as-is */

/* Section title: dashicon + text + blue underline */
.s66a-profile-section > h3 {
	display: flex;
	align-items: center;
	margin: 0 0 16px 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #f0f0f1;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

/* Make form-table inside cards look tidier */
.s66a-profile-section .form-table th {
	width: 200px;
	padding: 12px 10px 12px 0;
	font-weight: 500;
}

.s66a-profile-section .form-table td {
	padding: 12px 10px;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.s66a-empty-state {
	text-align: center;
	padding: 36px 20px;
	color: #787c82;
}

.s66a-empty-state .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	margin-bottom: 10px;
	opacity: 0.4;
}

.s66a-empty-state p {
	margin: 0;
	font-size: 14px;
}

/* ── Order search suggestion dropdown ────────────────────────────────────── */
#s66a-order-suggestions div,
#s66a-meta-order-suggestions div {
	transition: background 0.1s;
}

/* ── Log table improvements ──────────────────────────────────────────────── */
.s66a-profile-section .widefat {
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.s66a-profile-section .widefat th {
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
	font-weight: 600;
	padding: 8px 10px;
}

.s66a-profile-section .widefat td {
	padding: 8px 10px;
	vertical-align: middle;
}

/* ── Pro lock notice (used in bulk/settings when free) ───────────────────── */
.s66a-pro-notice {
	background: #fff;
	border: 1px solid #dcdcde;
	border-left: 4px solid #2271b1;
	padding: 20px 24px;
	max-width: 600px;
	margin: 0 0 20px 0;
	border-radius: 0 3px 3px 0;
}

.s66a-pro-notice h3 {
	margin: 0 0 8px 0;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.s66a-pro-notice p {
	margin: 0 0 16px 0;
	color: #50575e;
}

