/*!
 * Storzen v1.2.2 — Archive Toolbar Widget Styles
 *
 * Covers:
 *  • .sz-archive-ordering       (Archive Ordering widget)
 *  • .sz-archive-result-count   (Archive Result Count widget)
 *  • .sz-archive-title          (Archive Title widget)
 *
 * Loaded only on is_woocommerce() pages (shop, archive, search) via
 * Storzen_Init::enqueue_archive_styles().
 *
 * Design rules:
 *  • Targets WooCommerce's own output classes (.woocommerce-ordering,
 *    .woocommerce-result-count, etc.) from inside the Storzen wrapper
 *    so theme base styles are preserved and only specific properties
 *    are overridden.
 *  • Uses CSS custom properties for values the Elementor controls set,
 *    avoiding specificity battles with theme stylesheets.
 *  • RTL-aware with [dir="rtl"] selectors.
 *
 * @package storzen
 * @since   1.2.2
 */

/* ─────────────────────────────────────────────────────────────────────────────
   1. ARCHIVE ORDERING WIDGET
   ───────────────────────────────────────────────────────────────────────── */

.sz-archive-ordering {
	display: flex;
	align-items: center;
	justify-content: flex-end; /* overridden by Elementor alignment control */
	width: 100%;
}

/* Remove WooCommerce's own float on the form */
.sz-archive-ordering .woocommerce-ordering {
	float: none !important;
	margin: 0;
}

/* The native <select class="orderby"> */
.sz-archive-ordering select,
.sz-archive-ordering .orderby {
	display: block;
	width: 200px; /* overridden by Elementor slider control */
	padding: 8px 32px 8px 12px;
	font-size: inherit;
	line-height: 1.4;
	color: #1f2937;
	background-color: #ffffff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sz-archive-ordering select:hover,
.sz-archive-ordering .orderby:hover {
	border-color: #d1d5db;
}

.sz-archive-ordering select:focus,
.sz-archive-ordering .orderby:focus {
	outline: 2px solid #FF3636;
	outline-offset: 1px;
	border-color: #FF3636;
}

/* RTL: flip the chevron */
[dir="rtl"] .sz-archive-ordering select,
[dir="rtl"] .sz-archive-ordering .orderby {
	background-position: left 12px center;
	padding: 8px 12px 8px 32px;
}


/* ─────────────────────────────────────────────────────────────────────────────
   2. ARCHIVE RESULT COUNT WIDGET
   ───────────────────────────────────────────────────────────────────────── */

.sz-archive-result-count {
	display: flex;
	align-items: center;
	width: 100%;
}

/* WC outputs <p class="woocommerce-result-count"> */
.sz-archive-result-count .woocommerce-result-count,
.sz-archive-result-count p {
	margin: 0;
	font-size: 0.9em;
	line-height: 1.5;
	color: #6b7280; /* overridden by Elementor color control */
}


/* ─────────────────────────────────────────────────────────────────────────────
   3. ARCHIVE TITLE WIDGET
   ───────────────────────────────────────────────────────────────────────── */

.sz-archive-title {
	margin: 0;
	font-size: 2em;
	font-weight: 700;
	line-height: 1.25;
	color: #111827; /* overridden by Elementor color control */
	word-break: break-word;
}

/* Strip WooCommerce's forced float or margin on native .page-title */
.sz-archive-title.page-title {
	float: none !important;
	clear: none;
}
