/**
 * "תשלום עם תווי קנייה / שוברים" — Blocks Checkout styles.
 *
 * Layout:
 *   .shop-companion-vouchers
 *     ├ .shop-companion-vouchers__tiles (always visible)
 *     │   └ .shop-companion-vouchers__tile (×N)
 *     │       ├ .shop-companion-vouchers__tile-logo
 *     │       └ .shop-companion-vouchers__tile-name
 *     ├ .shop-companion-vouchers__form-wrap (only after a tile is clicked)
 *     │   └ .shop-companion-vouchers__form
 *     │       ├ .shop-companion-vouchers__field (×3)
 *     │       └ .shop-companion-vouchers__checking / __balance / __inline-error
 *     └ .shop-companion-vouchers__hint (shown when no tile is selected)
 *
 * Visual values follow AGENTS.md tokens: spacing 8/12/16/20/24, radius
 * 8/12/16, motion 150/300 ms with cubic-bezier(0.34, 1.56, 0.64, 1).
 */

.shop-companion-vouchers {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 4px 0;
	font-family: inherit;
	color: var(--shop-text, #0a0a0a);
}

/* ============================================================
 * Provider tiles — always visible
 * ============================================================ */
.shop-companion-vouchers__tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
}

.shop-companion-vouchers__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 16px 12px;
	background: var(--shop-surface, #ffffff);
	border: 2px solid var(--shop-border, #e5e5e5);
	border-radius: 12px;
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: center;
	transition: border-color 150ms cubic-bezier(0.34, 1.56, 0.64, 1),
	            background-color 150ms cubic-bezier(0.34, 1.56, 0.64, 1),
	            transform 150ms cubic-bezier(0.34, 1.56, 0.64, 1),
	            box-shadow 150ms ease;
}

.shop-companion-vouchers__tile:hover {
	border-color: var(--shop-border-dark, #d4d4d4);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.shop-companion-vouchers__tile:focus-visible {
	outline: 2px solid var(--shop-accent, #2563eb);
	outline-offset: 2px;
}

.shop-companion-vouchers__tile.is-selected {
	border-color: var(--shop-accent, #2563eb);
	background: var(--shop-accent-soft, rgba(37, 99, 235, 0.06));
}

.shop-companion-vouchers__tile-logo {
	width: 100%;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.shop-companion-vouchers__tile-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.shop-companion-vouchers__tile-initial {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: var(--shop-surface-alt, #f5f5f5);
	color: var(--shop-text-muted, #737373);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 600;
}

.shop-companion-vouchers__tile-name {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--shop-text, #0a0a0a);
}

/* ============================================================
 * Inline hint shown before any tile is clicked
 * ============================================================ */
.shop-companion-vouchers__hint {
	margin: 0;
	font-size: 13px;
	color: var(--shop-text-muted, #737373);
	line-height: 1.45;
}

/* ============================================================
 * Form (expands under the selected tile)
 * ============================================================ */
.shop-companion-vouchers__form-wrap {
	padding: 16px 20px;
	background: var(--shop-surface, #ffffff);
	border: 1px solid var(--shop-border, #e5e5e5);
	border-radius: 16px;
	animation: shop-companion-vouchers-fade-in 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shop-companion-vouchers__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.shop-companion-vouchers__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.shop-companion-vouchers__field-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.shop-companion-vouchers__field label {
	font-size: 13px;
	font-weight: 500;
	color: var(--shop-text, #0a0a0a);
}

.shop-companion-vouchers__field input {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	font-family: inherit;
	color: var(--shop-text, #0a0a0a);
	background: var(--shop-surface, #ffffff);
	border: 1px solid var(--shop-border-dark, #d4d4d4);
	border-radius: 8px;
	transition: border-color 150ms cubic-bezier(0.34, 1.56, 0.64, 1),
	            box-shadow 150ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shop-companion-vouchers__field input:hover {
	border-color: var(--shop-text-muted, #737373);
}

.shop-companion-vouchers__field input:focus {
	outline: none;
	border-color: var(--shop-accent, #2563eb);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.shop-companion-vouchers__use-max {
	background: transparent;
	border: 0;
	color: var(--shop-accent, #2563eb);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 150ms ease;
}

.shop-companion-vouchers__use-max:hover {
	color: var(--shop-accent-strong, #1d4ed8);
}

/* ============================================================
 * Status rows inside the form
 * ============================================================ */
.shop-companion-vouchers__checking,
.shop-companion-vouchers__balance {
	margin: 4px 0 0;
	font-size: 13px;
}

.shop-companion-vouchers__checking {
	color: var(--shop-text-muted, #737373);
}

.shop-companion-vouchers__balance {
	font-weight: 500;
	color: var(--shop-text, #0a0a0a);
}

.shop-companion-vouchers__inline-error {
	margin: 4px 0 0;
	font-size: 13px;
	color: #b91c1c;
}

/* ============================================================
 * RTL
 * ============================================================ */
html[dir="rtl"] .shop-companion-vouchers {
	direction: rtl;
}

/* ============================================================
 * Mobile
 * ============================================================ */
@media (max-width: 480px) {
	.shop-companion-vouchers {
		gap: 12px;
	}

	.shop-companion-vouchers__tiles {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}

	.shop-companion-vouchers__tile {
		padding: 12px 8px;
	}

	.shop-companion-vouchers__tile-logo,
	.shop-companion-vouchers__tile-initial {
		height: 44px;
	}

	.shop-companion-vouchers__tile-initial {
		width: 44px;
		font-size: 18px;
	}

	.shop-companion-vouchers__form-wrap {
		padding: 14px 16px;
	}
}

/* ============================================================
 * Reduced motion
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.shop-companion-vouchers__tile,
	.shop-companion-vouchers__field input,
	.shop-companion-vouchers__use-max,
	.shop-companion-vouchers__form-wrap {
		transition: none;
		animation: none;
	}

	.shop-companion-vouchers__tile:hover {
		transform: none;
	}
}

@keyframes shop-companion-vouchers-fade-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
