/*
 * Webcasata FilterX – Admin Styles v1.0.4
 * Modern stepped builder UI
 */

/* ------------------------------------------------------------------ */
/* Reset & base                                                         */
/* ------------------------------------------------------------------ */
.filterx-wrap * { box-sizing: border-box; }
.filterx-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1d2327; }

/* ------------------------------------------------------------------ */
/* Page header                                                          */
/* ------------------------------------------------------------------ */
.filterx-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 0 16px;
	border-bottom: 1px solid #e2e4e7;
	margin-bottom: 24px;
}
.filterx-page-header__title {
	display: flex;
	align-items: center;
	gap: 10px;
}
.filterx-page-header__title h1 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1;
}
.filterx-page-header__title .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
	color: #2271b1;
}
.filterx-back-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	color: #646970;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.filterx-back-arrow:hover { background: #f0f0f1; color: #1d2327; }
.filterx-back-arrow .dashicons { font-size: 18px; width: 18px; height: 18px; }
.filterx-saved-notice {
	font-size: 13px;
	color: #00a32a;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                              */
/* ------------------------------------------------------------------ */
.filterx-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
	line-height: 1.4;
	white-space: nowrap;
}
.filterx-btn .dashicons { font-size: 16px; width: 16px; height: 16px; margin: 0; }
.filterx-btn--primary  { background: #2271b1; color: #fff; border-color: #2271b1; }
.filterx-btn--primary:hover  { background: #135e96; border-color: #135e96; color: #fff; }
.filterx-btn--primary:active { transform: scale(0.98); }
.filterx-btn--outline  { background: #fff; color: #2271b1; border-color: #2271b1; }
.filterx-btn--outline:hover  { background: #f0f6fc; }
.filterx-btn--danger   { background: #fff; color: #b32d2e; border-color: #d63638; }
.filterx-btn--danger:hover   { background: #b32d2e; color: #fff; }
.filterx-btn--sm       { padding: 5px 10px; font-size: 12px; }
.filterx-btn--lg       { padding: 11px 22px; font-size: 14px; }
.filterx-btn--full     { width: 100%; justify-content: center; }

/* ------------------------------------------------------------------ */
/* Form inputs                                                          */
/* ------------------------------------------------------------------ */
.filterx-input {
	width: 100%;
	padding: 9px 12px;
	border: 1.5px solid #c3c4c7;
	border-radius: 6px;
	font-size: 14px;
	color: #1d2327;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
	font-family: inherit;
	appearance: none;
}
.filterx-input--lg { font-size: 15px; padding: 11px 14px; }
.filterx-input:focus { outline: none; border-color: #2271b1; box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.12); }

.filterx-select {
	width: 100%;
	padding: 9px 32px 9px 12px;
	border: 1.5px solid #c3c4c7;
	border-radius: 6px;
	font-size: 14px;
	color: #1d2327;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23646970' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
	appearance: none;
	font-family: inherit;
	transition: border-color 0.15s;
	cursor: pointer;
}
.filterx-select:focus { outline: none; border-color: #2271b1; box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.12); }

.filterx-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 6px;
}
.filterx-hint {
	font-size: 12px;
	color: #646970;
	margin: 5px 0 0;
}
.filterx-field { margin-bottom: 0; }
.filterx-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.filterx-field-row--three { grid-template-columns: 1fr 1fr 1fr; }

/* ------------------------------------------------------------------ */
/* Builder layout                                                       */
/* ------------------------------------------------------------------ */
.filterx-builder {
	display: grid;
	grid-template-columns: 1fr 260px;
	gap: 20px;
	align-items: start;
	margin-top: 4px;
}
.filterx-builder__main { display: flex; flex-direction: column; gap: 12px; }
.filterx-builder__sidebar { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 32px; }

/* ------------------------------------------------------------------ */
/* Steps                                                                */
/* ------------------------------------------------------------------ */
.filterx-step {
	background: #fff;
	border: 1.5px solid #e2e4e7;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.filterx-step:focus-within {
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34,113,177,0.08);
}
.filterx-step--locked {
	/* Hidden by default — JS removes this class to reveal the step */
	display: none !important;
}

.filterx-step__header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 20px 16px;
	border-bottom: 1px solid #f0f0f1;
	background: #fafafa;
}
.filterx-step__header h2 {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 2px;
	color: #1d2327;
}
.filterx-step__header p {
	font-size: 12px;
	color: #646970;
	margin: 0;
}
.filterx-step__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #2271b1;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
	margin-top: 1px;
}
.filterx-step__body { padding: 20px; }
.filterx-step__hint {
	font-size: 13px;
	color: #646970;
	margin: 12px 0 0;
	font-style: italic;
}

/* ------------------------------------------------------------------ */
/* Post type picker                                                     */
/* ------------------------------------------------------------------ */
.filterx-posttype-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}
.filterx-posttype-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 12px 14px;
	border: 1.5px solid #e2e4e7;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
	background: #fff;
}
.filterx-posttype-card input { display: none; }
.filterx-posttype-card:hover { border-color: #2271b1; background: #f0f6fc; }
.filterx-posttype-card.is-selected {
	border-color: #2271b1;
	background: #f0f6fc;
	box-shadow: 0 0 0 3px rgba(34,113,177,0.12);
}
.filterx-posttype-card__icon {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #2271b1;
}
.filterx-posttype-card strong { font-size: 13px; color: #1d2327; display: block; line-height: 1.3; }
.filterx-posttype-card code  { font-size: 10px; color: #646970; background: #f0f0f1; padding: 1px 5px; border-radius: 3px; }

/* ------------------------------------------------------------------ */
/* Taxonomy picker                                                      */
/* ------------------------------------------------------------------ */
.filterx-taxonomy-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 8px;
}
.filterx-tax-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1.5px solid #e2e4e7;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	background: #fff;
	position: relative;
}
.filterx-tax-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.filterx-tax-card:hover { border-color: #2271b1; background: #f0f6fc; }
.filterx-tax-card.is-checked {
	border-color: #2271b1;
	background: #f0f6fc;
}
.filterx-tax-card__check {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	border: 1.5px solid #c3c4c7;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s, border-color 0.15s;
}
.filterx-tax-card.is-checked .filterx-tax-card__check {
	background: #2271b1;
	border-color: #2271b1;
}
.filterx-tax-card__check .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	color: #fff;
	display: none;
}
.filterx-tax-card.is-checked .filterx-tax-card__check .dashicons { display: block; }
.filterx-tax-card__label strong { font-size: 13px; display: block; color: #1d2327; }
.filterx-tax-card__label code   { font-size: 11px; color: #646970; }

.filterx-taxonomy-loading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #646970;
	padding: 8px 0;
}
.filterx-spinner-inline {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #e2e4e7;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: sx-spin 0.7s linear infinite;
	flex-shrink: 0;
}
@keyframes sx-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ */
/* Layout picker                                                        */
/* ------------------------------------------------------------------ */
.filterx-layout-picker {
	display: flex;
	gap: 10px;
}
.filterx-layout-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 20px 12px;
	border: 1.5px solid #e2e4e7;
	border-radius: 8px;
	cursor: pointer;
	min-width: 90px;
	font-size: 12px;
	font-weight: 500;
	color: #646970;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.filterx-layout-option input { display: none; }
.filterx-layout-option:hover { border-color: #2271b1; color: #2271b1; background: #f0f6fc; }
.filterx-layout-option.is-selected { border-color: #2271b1; background: #f0f6fc; color: #2271b1; }
.filterx-layout-option__icon svg { display: block; }

/* ------------------------------------------------------------------ */
/* Pagination cards                                                     */
/* ------------------------------------------------------------------ */
.filterx-pagination-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.filterx-pag-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1.5px solid #e2e4e7;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	position: relative;
}
.filterx-pag-card input { position: absolute; opacity: 0; }
.filterx-pag-card:hover:not(.is-locked) { border-color: #2271b1; background: #f0f6fc; }
.filterx-pag-card.is-selected { border-color: #2271b1; background: #f0f6fc; }
.filterx-pag-card.is-locked { opacity: 0.55; cursor: not-allowed; }
.filterx-pag-card__icon {
	font-size: 20px;
	font-weight: 700;
	color: #2271b1;
	width: 32px;
	text-align: center;
	flex-shrink: 0;
	font-family: monospace;
}
.filterx-pag-card__label { flex: 1; }
.filterx-pag-card__label strong { font-size: 13px; display: block; color: #1d2327; margin-bottom: 2px; }
.filterx-pag-card__label span   { font-size: 11px; color: #646970; }

/* ------------------------------------------------------------------ */
/* Toggles                                                              */
/* ------------------------------------------------------------------ */
.filterx-toggles { display: flex; flex-direction: column; gap: 14px; }
.filterx-toggle {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
}
.filterx-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.filterx-toggle__track {
	position: relative;
	width: 36px;
	height: 20px;
	border-radius: 20px;
	background: #c3c4c7;
	flex-shrink: 0;
	margin-top: 1px;
	transition: background 0.2s;
	cursor: pointer;
}
.filterx-toggle__track::after {
	content: '';
	position: absolute;
	top: 2px; left: 2px;
	width: 16px; height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.filterx-toggle input:checked ~ .filterx-toggle__track { background: #2271b1; }
.filterx-toggle input:checked ~ .filterx-toggle__track::after { transform: translateX(16px); }
.filterx-toggle__label { font-size: 13px; color: #1d2327; font-weight: 500; line-height: 1.4; }
.filterx-toggle__label span { display: block; font-size: 12px; color: #646970; font-weight: 400; margin-top: 1px; }

/* ------------------------------------------------------------------ */
/* Sidebar boxes                                                        */
/* ------------------------------------------------------------------ */
.filterx-sidebar-box {
	background: #fff;
	border: 1.5px solid #e2e4e7;
	border-radius: 10px;
	padding: 16px 18px;
}
.filterx-sidebar-box h3 {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 14px;
	color: #1d2327;
}
.filterx-sidebar-box__desc { font-size: 12px; color: #646970; margin: -8px 0 10px; }
.filterx-sidebar-box--publish { border-color: #2271b1; background: #f8fbff; }
.filterx-sidebar-box__status {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #646970;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #e8eef6;
}
.filterx-status-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: #00a32a;
	flex-shrink: 0;
}
.filterx-sidebar-box--pro { background: #fffbf0; border-color: #f0c040; }
.filterx-sidebar-box--pro h3 { color: #7a5800; }

/* Shortcode box */
.filterx-shortcode-box {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f6f7f7;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	padding: 8px 10px;
}
.filterx-shortcode-box code { flex: 1; font-size: 11px; color: #2c3338; word-break: break-all; }
.filterx-copy-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #646970;
	padding: 2px;
	flex-shrink: 0;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
	display: flex;
}
.filterx-copy-btn:hover { color: #2271b1; background: #e8eef6; }
.filterx-copy-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* Summary list */
.filterx-summary-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.filterx-summary-list li {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
}
.filterx-summary-list li span { color: #646970; }
.filterx-summary-list li strong { color: #1d2327; font-weight: 500; }

/* Pro list */
.webcasata-filterx-pro-list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.webcasata-filterx-pro-list li {
	font-size: 12px;
	color: #5a3e00;
	padding-left: 16px;
	position: relative;
}
.webcasata-filterx-pro-list li::before { content: '✓'; position: absolute; left: 0; color: #d4930d; font-weight: 700; }

/* ------------------------------------------------------------------ */
/* Dashboard list table                                                 */
/* ------------------------------------------------------------------ */
.filterx-list-table-wrap { overflow-x: auto; }
.filterx-list-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1.5px solid #e2e4e7;
	border-radius: 10px;
	overflow: hidden;
}
.filterx-list-table thead th {
	background: #fafafa;
	border-bottom: 1.5px solid #e2e4e7;
	padding: 12px 16px;
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.filterx-list-table tbody tr { border-bottom: 1px solid #f0f0f1; transition: background 0.1s; }
.filterx-list-table tbody tr:last-child { border-bottom: none; }
.filterx-list-table tbody tr:hover { background: #fafafa; }
.filterx-list-table td { padding: 13px 16px; font-size: 13px; vertical-align: middle; }
.filterx-list-table__name { font-weight: 600; color: #1d2327; text-decoration: none; }
.filterx-list-table__name:hover { color: #2271b1; }
.filterx-list-table__actions { display: flex; gap: 6px; }

/* Badges */
.filterx-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
	background: #e8eef6;
	color: #2271b1;
}
.filterx-badge--outline {
	background: transparent;
	border: 1px solid #c3c4c7;
	color: #646970;
}
.webcasata-filterx-pro-badge {
	font-size: 10px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 20px;
	background: #fff7d6;
	color: #7a5800;
	border: 1px solid #f0c040;
	white-space: nowrap;
}
.filterx-muted { color: #c3c4c7; }

/* Shortcode cell in list table */
.filterx-shortcode-cell {
	font-size: 11px;
	cursor: pointer;
	background: #f6f7f7;
	padding: 3px 6px;
	border-radius: 3px;
	border: 1px solid #e2e4e7;
	transition: border-color 0.15s;
}
.filterx-shortcode-cell:hover { border-color: #2271b1; color: #2271b1; }

/* ------------------------------------------------------------------ */
/* Empty state                                                          */
/* ------------------------------------------------------------------ */
.filterx-empty-state {
	text-align: center;
	padding: 70px 24px;
	background: #fff;
	border: 1.5px dashed #e2e4e7;
	border-radius: 12px;
	margin-top: 4px;
}
.filterx-empty-state__icon {
	width: 64px; height: 64px;
	border-radius: 50%;
	background: #f0f6fc;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}
.filterx-empty-state__icon .dashicons { font-size: 30px; width: 30px; height: 30px; color: #2271b1; }
.filterx-empty-state h2 { font-size: 18px; color: #1d2327; margin: 0 0 8px; }
.filterx-empty-state p  { color: #646970; margin: 0 0 20px; font-size: 14px; }

/* ------------------------------------------------------------------ */
/* Pro feature rows (Go Pro page)                                       */
/* ------------------------------------------------------------------ */
.webcasata-filterx-pro-feature-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f1;
}
.webcasata-filterx-pro-feature-row:last-child { border-bottom: none; }
.webcasata-filterx-pro-feature-row .dashicons { font-size: 22px; width: 22px; height: 22px; color: #2271b1; flex-shrink: 0; margin-top: 2px; }
.webcasata-filterx-pro-feature-row strong { display: block; font-size: 13px; margin-bottom: 2px; }
.webcasata-filterx-pro-feature-row p { font-size: 12px; color: #646970; margin: 0; }

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
	.filterx-builder { grid-template-columns: 1fr; }
	.filterx-builder__sidebar { position: static; }
	.filterx-field-row--three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.filterx-field-row, .filterx-field-row--three { grid-template-columns: 1fr; }
	.filterx-posttype-grid { grid-template-columns: 1fr 1fr; }
	.filterx-pagination-grid { grid-template-columns: 1fr; }
	.filterx-layout-picker { flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ */
/* Card element toggles (Display Options step)                          */
/* ------------------------------------------------------------------ */
.filterx-card-toggles {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin-top: 6px;
}
.filterx-card-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}
.filterx-card-toggle input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.filterx-card-toggle__track {
	display: inline-block;
	flex-shrink: 0;
	width: 36px;
	height: 20px;
	background: #c3c4c7;
	border-radius: 20px;
	position: relative;
	transition: background 0.2s;
}
.filterx-card-toggle__track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.filterx-card-toggle input:checked ~ .filterx-card-toggle__track {
	background: #2271b1;
}
.filterx-card-toggle input:checked ~ .filterx-card-toggle__track::after {
	transform: translateX(16px);
}
.filterx-card-toggle__label {
	font-size: 13px;
	color: #1d2327;
	font-weight: 500;
	min-width: 60px;
}
