/**
 * Banking dictionary — additions on top of nepal-remittance-hub-shell.css (same .bf-remit-hub.bf-guide shell).
 * Do not duplicate frame/hero/promo/FAB tokens here; those come from the remittance hub stylesheet.
 */

.bf-remit-hub.bf-guide.bf-bank-dict-hub button,
.bf-remit-hub.bf-guide.bf-bank-dict-hub [type='button'] {
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

/* <button> uses same class as remittance <a> quick tiles */
.bf-remit-hub.bf-guide button.bf-remit-quick__btn {
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	width: 100%;
}

/* List / grid toggle: desktop only (mobile stays grid cards) */
@media (max-width: 639px) {
	.bf-remit-hub.bf-guide .bf-bdict-view-toggle--desktop {
		display: none !important;
	}
	.bf-remit-hub.bf-guide .bd-terms {
		grid-template-columns: 1fr !important;
	}
}

/* Title badge spacing */
.bf-remit-hub.bf-guide .bf-bdict__title .bf-remit__badge {
	margin-left: 0.35rem;
	vertical-align: middle;
}

/* Search panel (inside .bf-guide__promo) */
.bf-remit-hub.bf-guide .bf-bdict-search-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: stretch;
	margin-top: 0.5rem;
	margin-bottom: 0.65rem;
}

.bf-remit-hub.bf-guide .bf-bdict-search-field {
	flex: 1 1 12rem;
	position: relative;
}

.bf-remit-hub.bf-guide .bf-bdict-search-ico {
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--g-muted);
	pointer-events: none;
	font-size: 0.95rem;
}

.bf-remit-hub.bf-guide .bf-bdict-search-input {
	width: 100%;
	padding: 0.85rem 0.85rem 0.85rem 2.6rem;
	border: 1.5px solid var(--g-border);
	border-radius: calc(var(--g-radius) * 0.5);
	font-size: 1rem;
	font-family: inherit;
	background: color-mix(in srgb, var(--g-surface) 96%, var(--g-bg));
	color: var(--g-ink);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.bf-remit-hub.bf-guide .bf-bdict-search-input:focus {
	outline: none;
	border-color: color-mix(in srgb, var(--g-accent) 45%, var(--g-border));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-accent) 18%, transparent);
}

.bf-remit-hub.bf-guide .bf-bdict-search-submit {
	flex: 0 0 auto;
	min-height: 3rem;
	min-width: 6.5rem;
	width: auto;
}

/* Category chips — horizontal scroll on narrow */
.bf-remit-hub.bf-guide .bf-bdict-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

@container bf-remit (max-width: 519px) {
	.bf-remit-hub.bf-guide .bf-bdict-filters {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.25rem;
		margin: 0 -0.15rem;
		padding-left: 0.15rem;
		padding-right: 0.15rem;
		scrollbar-width: none;
	}
	.bf-remit-hub.bf-guide .bf-bdict-filters::-webkit-scrollbar {
		display: none;
	}
}

.bf-remit-hub.bf-guide .bd-filter-btn {
	flex: 0 0 auto;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
	border: 1.5px solid var(--g-border);
	background: color-mix(in srgb, var(--g-surface) 94%, var(--g-bg));
	color: var(--g-muted);
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	font-family: inherit;
	white-space: nowrap;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}

.bf-remit-hub.bf-guide .bd-filter-btn:hover {
	color: var(--g-accent);
	border-color: color-mix(in srgb, var(--g-accent) 35%, var(--g-border));
}

.bf-remit-hub.bf-guide .bd-filter-btn.is-active {
	background: color-mix(in srgb, var(--g-accent) 88%, var(--g-bg));
	color: var(--g-on-accent);
	border-color: color-mix(in srgb, var(--g-accent) 70%, var(--g-border));
}

.bf-remit-hub.bf-guide .bd-filter-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-accent) 22%, transparent);
}

/* Toolbar: stat + list/grid */
.bf-remit-hub.bf-guide .bf-bdict-toolbar {
	margin-bottom: 1rem;
}

.bf-remit-hub.bf-guide .bf-bdict-toolbar-inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

@container bf-remit (min-width: 560px) {
	.bf-remit-hub.bf-guide .bf-bdict-toolbar-inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.bf-remit-hub.bf-guide .bf-bdict-stat-grid {
	max-width: 14rem;
	grid-template-columns: 1fr;
}

.bf-remit-hub.bf-guide .bf-bdict-stat-grid .bf-remit__stat-value {
	color: var(--g-accent);
}

.bf-remit-hub.bf-guide .bf-bdict-view-toggle {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem;
	width: 100%;
}

@container bf-remit (min-width: 560px) {
	.bf-remit-hub.bf-guide .bf-bdict-view-toggle {
		width: auto;
		min-width: 16rem;
	}
}

.bf-remit-hub.bf-guide .bf-bdict-view-btn {
	min-height: 3.5rem;
	width: 100%;
}

.bf-remit-hub.bf-guide .bf-bdict-view-btn.is-active {
	border-color: color-mix(in srgb, var(--g-accent) 60%, var(--g-border));
	background: color-mix(in srgb, var(--g-accent) 14%, var(--g-surface));
}

/* Terms */
.bf-remit-hub.bf-guide .bd-terms {
	display: grid;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.bf-remit-hub.bf-guide .bd-terms--list {
	grid-template-columns: 1fr;
}

.bf-remit-hub.bf-guide .bd-terms--grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@container bf-remit (max-width: 900px) {
	.bf-remit-hub.bf-guide .bd-terms--grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container bf-remit (max-width: 520px) {
	.bf-remit-hub.bf-guide .bd-terms--grid {
		grid-template-columns: 1fr;
	}
}

.bf-remit-hub.bf-guide .bd-card {
	background: color-mix(in srgb, var(--g-surface) 96%, var(--g-bg));
	border: 1px solid var(--g-border);
	border-radius: calc(var(--g-radius) * 0.65);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 0.75rem);
}

@media (hover: hover) {
	.bf-remit-hub.bf-guide .bd-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 12px 32px color-mix(in srgb, var(--g-accent) 8%, rgba(0, 0, 0, 0.12));
	}
}

.bf-remit-hub.bf-guide .bd-card-head {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem 0.9rem;
	background: color-mix(in srgb, var(--g-surface) 92%, var(--g-bg));
	border-bottom: 1px solid var(--g-border);
	flex-wrap: wrap;
}

.bf-remit-hub.bf-guide .bd-card-num {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: calc(var(--g-radius) * 0.4);
	background: linear-gradient(145deg, color-mix(in srgb, var(--g-accent) 85%, #1d4ed8), var(--g-accent));
	color: var(--g-on-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 0.9rem;
	flex-shrink: 0;
}

.bf-remit-hub.bf-guide .bd-card-titles {
	flex: 1;
	min-width: 0;
}

.bf-remit-hub.bf-guide .bd-card-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 0.2rem;
	color: var(--g-ink);
	line-height: 1.3;
}

.bf-remit-hub.bf-guide .bd-card-sub {
	margin: 0;
	font-size: 0.9rem;
	color: var(--g-muted);
	font-weight: 600;
}

.bf-remit-hub.bf-guide .bd-card-cat {
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: capitalize;
	background: color-mix(in srgb, var(--g-accent) 14%, var(--g-surface));
	color: color-mix(in srgb, var(--g-accent) 55%, var(--g-ink));
	max-width: 9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bf-remit-hub.bf-guide .bd-card-body {
	padding: 0.9rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.bf-remit-hub.bf-guide .bd-def.is-hidden {
	display: none;
}

.bf-remit-hub.bf-guide .bd-lang-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.65rem;
	border-radius: 6px;
	font-size: 0.7rem;
	font-weight: 800;
	margin-bottom: 0.6rem;
	background: color-mix(in srgb, #1d4ed8 12%, var(--g-surface));
	color: #1d4ed8;
}

.bf-remit-hub.bf-guide .bd-lang-tag--np {
	background: color-mix(in srgb, #7c3aed 14%, var(--g-surface));
	color: #6d28d9;
}

.bf-remit-hub.bf-guide .bd-def-text {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	line-height: 1.6;
	color: color-mix(in srgb, var(--g-ink) 88%, var(--g-muted));
}

.bf-remit-hub.bf-guide .bd-example {
	margin: 0;
	padding: 0.75rem 0.85rem;
	border-radius: calc(var(--g-radius) * 0.45);
	background: color-mix(in srgb, var(--g-surface) 90%, var(--g-bg));
	border-left: 3px solid #16a34a;
	font-size: 0.85rem;
	line-height: 1.55;
	color: var(--g-muted);
}

.bf-remit-hub.bf-guide .bd-example strong {
	color: #15803d;
	font-weight: 700;
}

.bf-remit-hub.bf-guide .bd-card-actions {
	display: flex;
	gap: 0.5rem;
	padding: 0.85rem 0.9rem 1rem;
	border-top: 1px solid var(--g-border);
	background: color-mix(in srgb, var(--g-surface) 93%, var(--g-bg));
}

@container bf-remit (max-width: 400px) {
	.bf-remit-hub.bf-guide .bd-card-actions {
		flex-direction: column;
	}
}

.bf-remit-hub.bf-guide .bd-act {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.75rem 0.5rem;
	border: none;
	border-radius: calc(var(--g-radius) * 0.45);
	font-weight: 700;
	font-size: 0.82rem;
	cursor: pointer;
	font-family: inherit;
	color: #fff;
	transition: filter 0.15s, transform 0.15s;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}

.bf-remit-hub.bf-guide .bd-act:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.bf-remit-hub.bf-guide .bd-act:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-accent) 25%, transparent);
}

.bf-remit-hub.bf-guide .bd-act--lang {
	background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.bf-remit-hub.bf-guide .bd-act--copy {
	background: linear-gradient(135deg, #16a34a, #15803d);
}

.bf-remit-hub.bf-guide .bd-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 2.5rem 1rem;
	color: var(--g-muted);
}

.bf-remit-hub.bf-guide .bd-empty i {
	font-size: 2rem;
	margin-bottom: 0.5rem;
	opacity: 0.45;
	display: block;
}

.bf-remit-hub.bf-guide .bd-empty h3 {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
	color: var(--g-ink);
}

.bf-remit-hub.bf-guide .bd-empty p {
	margin: 0;
	font-size: 0.9rem;
}

/* Pagination */
.bf-remit-hub.bf-guide .bd-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem;
	margin-bottom: 0.5rem;
}

.bf-remit-hub.bf-guide .bd-page-btn {
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.4rem 0.65rem;
	border-radius: calc(var(--g-radius) * 0.4);
	border: 1.5px solid var(--g-border);
	background: color-mix(in srgb, var(--g-surface) 96%, var(--g-bg));
	color: var(--g-muted);
	font-weight: 700;
	font-size: 0.82rem;
	cursor: pointer;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}

.bf-remit-hub.bf-guide .bd-page-btn:hover:not(:disabled) {
	border-color: color-mix(in srgb, var(--g-accent) 40%, var(--g-border));
	color: var(--g-ink);
}

.bf-remit-hub.bf-guide .bd-page-btn.is-active {
	background: color-mix(in srgb, var(--g-accent) 85%, var(--g-bg));
	color: var(--g-on-accent);
	border-color: transparent;
}

.bf-remit-hub.bf-guide .bd-page-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Toast above FAB */
.bf-remit-hub.bf-guide .bd-toast {
	position: fixed;
	bottom: max(1rem, env(safe-area-inset-bottom, 0px));
	left: 50%;
	transform: translateX(-50%) translateY(120%);
	z-index: 200;
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.75rem 1.1rem;
	border-radius: calc(var(--g-radius) * 0.45);
	background: linear-gradient(135deg, #16a34a, #15803d);
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	box-shadow: 0 10px 36px rgba(0, 0, 0, 0.2);
	pointer-events: none;
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
	max-width: calc(100vw - 2rem);
}

.bf-remit-hub.bf-guide .bd-toast.is-visible {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

@container bf-remit (min-width: 768px) {
	.bf-remit-hub.bf-guide .bd-toast {
		left: auto;
		right: max(1rem, env(safe-area-inset-right, 0px));
		transform: translateX(0) translateY(120%);
	}
	.bf-remit-hub.bf-guide .bd-toast.is-visible {
		transform: translateX(0) translateY(0);
		bottom: max(4.5rem, env(safe-area-inset-bottom, 0px));
	}
}

.bf-remit-hub.bf-guide .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Dark mode — extends remittance shell tokens */
.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='dark'] {
	color-scheme: dark;
	--g-ink: #f1f5f9;
	--g-muted: rgba(241, 245, 249, 0.68);
	--g-surface: rgba(17, 24, 39, 0.94);
	--g-border: rgba(148, 163, 184, 0.22);
	--g-bg: #0b1220;
	--g-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
	--g-on-accent: #0c0f18;
}

@media (prefers-color-scheme: dark) {
	.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='auto'] {
		color-scheme: dark;
		--g-ink: #f1f5f9;
		--g-muted: rgba(241, 245, 249, 0.68);
		--g-surface: rgba(17, 24, 39, 0.94);
		--g-border: rgba(148, 163, 184, 0.22);
		--g-bg: #0b1220;
		--g-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
		--g-on-accent: #0c0f18;
	}
}

.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='dark'] .bd-lang-tag,
.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='dark'] .bd-lang-tag--np {
	color: #c4b5fd;
}

@media (prefers-color-scheme: dark) {
	.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='auto'] .bd-lang-tag,
	.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='auto'] .bd-lang-tag--np {
		color: #c4b5fd;
	}
}

.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='dark'] .bd-example strong {
	color: #4ade80;
}

@media (prefers-color-scheme: dark) {
	.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='auto'] .bd-example strong {
		color: #4ade80;
	}
}

.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='dark'] .bf-remit__badge--ok {
	color: #86efac;
}

@media (prefers-color-scheme: dark) {
	.bf-remit-hub.bf-guide.bf-bank-dict-hub[data-bf-theme='auto'] .bf-remit__badge--ok {
		color: #86efac;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bf-remit-hub.bf-guide.bf-bank-dict-hub *,
	.bf-remit-hub.bf-guide.bf-bank-dict-hub *::before,
	.bf-remit-hub.bf-guide.bf-bank-dict-hub *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
