/**
 * Shared UI components: icons, buttons, icon buttons, badges, logo.
 */

/* Icons ------------------------------------------------------------------ */
.az-icon {
	inline-size: 1.5em;
	block-size: 1.5em;
	flex-shrink: 0;
	vertical-align: middle;
}

/* Directional icons (…-end) point to the inline end: flip in RTL. */
[dir="rtl"] .az-icon--dir {
	transform: scaleX(-1);
}

/* Buttons ---------------------------------------------------------------- */
.az-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-block-size: var(--az-tap);
	padding: 10px 22px;
	border: 1px solid transparent;
	border-radius: 10px;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.az-btn--primary {
	background: var(--az-orange);
	color: var(--az-ink);
}

.az-btn--primary:hover {
	background: var(--az-orange-hover);
	color: var(--az-ink);
}

.az-btn--dark {
	background: var(--az-ink);
	color: var(--az-white);
}

.az-btn--dark:hover {
	background: var(--az-ink-2);
	color: var(--az-white);
}

.az-btn--ghost {
	background: transparent;
	border-color: currentColor;
	color: inherit;
}

/* Outline button on light backgrounds */
.az-btn--outline {
	background: var(--az-white);
	border-color: #cfcfcf;
	color: var(--az-ink);
}

.az-btn--outline:hover {
	border-color: var(--az-ink);
	color: var(--az-ink);
}

/* Empty states (no results, empty wishlist…) */
.az-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 48px 16px;
	border: 1px dashed #d4d4d4;
	border-radius: var(--az-radius-lg);
	background: var(--az-white);
	text-align: center;
	color: var(--az-muted);
}

.az-empty p {
	margin: 0;
}

.az-empty__icon {
	inline-size: 48px !important;
	block-size: 48px !important;
	margin-block-end: 6px;
	color: var(--az-orange-text);
}

.az-empty__title {
	color: var(--az-ink);
	font-size: 1.125rem;
	font-weight: 700;
}

.az-empty__actions,
.az-empty .az-btn {
	margin-block-start: 12px;
}

.az-empty__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.az-empty__actions .az-btn {
	margin: 0;
}

/* WooCommerce notices (WooCommerce CSS is not loaded on catalogue pages) */
.woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid var(--az-line);
	border-inline-start: 4px solid var(--az-success);
	border-radius: 10px;
	background: var(--az-white);
	list-style: none;
	font-size: 0.9375rem;
}

.woocommerce-info {
	border-inline-start-color: var(--az-ink);
}

.woocommerce-error {
	border-inline-start-color: #b42318;
}

.woocommerce-message .button,
.woocommerce-info .button {
	order: 2;
	color: var(--az-orange-text);
	font-weight: 700;
}

/* Outline button on dark backgrounds */
.az-btn--ghost-light {
	background: transparent;
	border-color: #5a5a5a;
	color: var(--az-white);
}

.az-btn--ghost-light:hover {
	border-color: var(--az-white);
	color: var(--az-white);
}

.az-btn--lg {
	min-block-size: 50px;
	padding: 12px 28px;
	font-size: 1rem;
}

/* Icon-only button (always ≥ 44px touch target) */
.az-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: var(--az-tap);
	block-size: var(--az-tap);
	padding: 0;
	border: 0;
	border-radius: var(--az-radius-sm);
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.az-iconbtn:hover {
	background: rgb(255 255 255 / 0.08);
}

/* Badges ----------------------------------------------------------------- */
.az-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 6px;
	background: var(--az-orange);
	color: var(--az-ink);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
}

.az-badge--dark {
	background: var(--az-ink);
	color: var(--az-white);
}

/* Logo (typographic wordmark until the final logo is supplied) ------------ */
.az-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--az-white);
	text-decoration: none;
}

.az-logo:hover {
	color: var(--az-white);
}

.az-logo__mark {
	display: grid;
	place-items: center;
	inline-size: 40px;
	block-size: 40px;
	border-radius: 10px;
	background: var(--az-orange);
	color: var(--az-ink);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1;
}

.az-logo__type {
	display: flex;
	flex-direction: column;
	line-height: 1;
	text-align: left;
}

.az-logo__name {
	font-size: 1.3125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.az-logo__tag {
	margin-block-start: 4px;
	color: var(--az-orange);
	font-size: 0.625rem;
	font-weight: 600;
	letter-spacing: 0.6em;
}

.custom-logo-link img {
	display: block;
	max-block-size: 48px;
	inline-size: auto;
}

/* Cart count bubble ------------------------------------------------------- */
.az-cart-count {
	position: absolute;
	inset-block-start: -6px;
	inset-inline-end: -8px;
	min-inline-size: 20px;
	block-size: 20px;
	padding-inline: 5px;
	border-radius: 10px;
	background: var(--az-orange);
	color: var(--az-ink);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
