/**
 * KAZZYLEN Smart Multi Currency — Frontend Styles
 * Floating bubble + all positions + sticky bar + flag support
 */

/* ── Reset ───────────────────────────────────────────────────────────────── */
.kazzylen-smc-switcher *,
.kazzylen-smc-switcher *::before,
.kazzylen-smc-switcher *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Position helpers ────────────────────────────────────────────────────── */
.kazzylen-smc-floating {
	position: fixed;
	z-index: 99999;
}

/* Bottom row */
.kazzylen-smc-pos--bottom-right { bottom: 24px; right: 24px; }
.kazzylen-smc-pos--bottom-left  { bottom: 24px; left:  24px; }

/* Middle row */
.kazzylen-smc-pos--middle-right { top: 50%; right: 24px;  transform: translateY(-50%); }
.kazzylen-smc-pos--middle-left  { top: 50%; left:  24px;  transform: translateY(-50%); }

/* Top row */
.kazzylen-smc-pos--top-right    { top: 80px; right: 24px; }
.kazzylen-smc-pos--top-left     { top: 80px; left:  24px; }

/* ── Floating Action Button (FAB) ────────────────────────────────────────── */
.kazzylen-smc-fab {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 16px;
	height: 48px;
	min-width: 80px;
	background: #7f54b3;
	color: #fff;
	border: none;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(127,84,179,.45);
	transition: transform .18s, box-shadow .18s, background .15s;
	white-space: nowrap;
	letter-spacing: .3px;
}
.kazzylen-smc-fab:hover  { background: #6b44a0; transform: scale(1.05); box-shadow: 0 6px 22px rgba(127,84,179,.55); }
.kazzylen-smc-fab:active { transform: scale(.97); }
.kazzylen-smc-fab:focus-visible { outline: 3px solid #f0e6ff; outline-offset: 3px; }

.kazzylen-smc-fab-flag   { font-size: 20px; line-height: 1; }
.kazzylen-smc-fab-symbol { font-size: 15px; opacity: .85; }
.kazzylen-smc-fab-code   { font-size: 13px; font-weight: 700; letter-spacing: .5px; }

/* ── Float dropdown list ─────────────────────────────────────────────────── */
.kazzylen-smc-float-list {
	position: absolute;
	bottom: calc(100% + 10px);
	right: 0;
	min-width: 220px;
	max-height: 320px;
	overflow-y: auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
	list-style: none;
	padding: 8px;
	opacity: 0;
	transform: translateY(6px) scale(.97);
	transition: opacity .18s, transform .18s;
	pointer-events: none;
}

/* Left-side positions: open list to the right */
.kazzylen-smc-pos--bottom-left  .kazzylen-smc-float-list,
.kazzylen-smc-pos--middle-left  .kazzylen-smc-float-list,
.kazzylen-smc-pos--top-left     .kazzylen-smc-float-list {
	right: auto;
	left: 0;
}

/* Top positions: open list below button */
.kazzylen-smc-pos--top-right .kazzylen-smc-float-list,
.kazzylen-smc-pos--top-left  .kazzylen-smc-float-list {
	bottom: auto;
	top: calc(100% + 10px);
	transform: translateY(-6px) scale(.97);
}
.kazzylen-smc-pos--top-right .kazzylen-smc-float-list[aria-hidden="false"],
.kazzylen-smc-pos--top-left  .kazzylen-smc-float-list[aria-hidden="false"] { transform: translateY(0) scale(1); }

/* Middle positions: open list to the right / left */
.kazzylen-smc-pos--middle-right .kazzylen-smc-float-list { bottom: auto; top: 50%; transform: translateY(-50%) translateX(-6px) scale(.97); right: calc(100% + 10px); }
.kazzylen-smc-pos--middle-left  .kazzylen-smc-float-list { bottom: auto; top: 50%; transform: translateY(-50%) translateX(6px)  scale(.97); left: calc(100% + 10px); }
.kazzylen-smc-pos--middle-right .kazzylen-smc-float-list.is-open { transform: translateY(-50%) translateX(0) scale(1); }
.kazzylen-smc-pos--middle-left  .kazzylen-smc-float-list.is-open { transform: translateY(-50%) translateX(0) scale(1); }

.kazzylen-smc-float-list.is-open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* scrollbar */
.kazzylen-smc-float-list::-webkit-scrollbar { width: 4px; }
.kazzylen-smc-float-list::-webkit-scrollbar-track { background: transparent; }
.kazzylen-smc-float-list::-webkit-scrollbar-thumb { background: #d0bef5; border-radius: 4px; }

/* ── Shared option item ───────────────────────────────────────────────────── */
.kazzylen-smc-option {
	border-radius: 8px;
	overflow: hidden;
}
.kazzylen-smc-option-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	text-decoration: none;
	color: #333;
	font-size: 13.5px;
	font-family: inherit;
	border-radius: 8px;
	transition: background .12s;
}
.kazzylen-smc-option-link:hover { background: #f5eeff; color: #7f54b3; text-decoration: none; }
.kazzylen-smc-option.is-active .kazzylen-smc-option-link { background: #f0e6ff; color: #7f54b3; font-weight: 700; }

.kazzylen-smc-flag   { font-size: 20px; line-height: 1; flex-shrink: 0; }
.kazzylen-smc-symbol { font-size: 13px; color: #7f54b3; font-weight: 600; min-width: 20px; }
.kazzylen-smc-code   { font-weight: 700; font-size: 13px; letter-spacing: .4px; }
.kazzylen-smc-name   { font-size: 12px; color: #888; flex: 1; }
.kazzylen-smc-check  { font-size: 13px; color: #7f54b3; margin-left: auto; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* ── STICKY BAR                                                            ── */
/* ─────────────────────────────────────────────────────────────────────────── */
.kazzylen-smc-sticky-bar {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 99999;
}
.kazzylen-smc-pos--sticky-right { right: 0; }
.kazzylen-smc-pos--sticky-left  { left:  0; }

.kazzylen-smc-sticky-inner { position: relative; }

.kazzylen-smc-sticky-trigger {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 54px;
	padding: 12px 0 10px;
	background: #7f54b3;
	color: #fff;
	border: none;
	font-family: inherit;
	cursor: pointer;
	box-shadow: 0 4px 18px rgba(127,84,179,.4);
	transition: background .15s, width .18s;
	/* Attach to edge with rounded inner corner */
}
.kazzylen-smc-pos--sticky-right .kazzylen-smc-sticky-trigger {
	border-radius: 10px 0 0 10px;
}
.kazzylen-smc-pos--sticky-left .kazzylen-smc-sticky-trigger {
	border-radius: 0 10px 10px 0;
}
.kazzylen-smc-sticky-trigger:hover { background: #6b44a0; }
.kazzylen-smc-sticky-trigger:focus-visible { outline: 3px solid #f0e6ff; outline-offset: 2px; }

.kazzylen-smc-sticky-trigger .kazzylen-smc-flag   { font-size: 22px; }
.kazzylen-smc-sticky-trigger .kazzylen-smc-sticky-code   { font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.kazzylen-smc-sticky-trigger .kazzylen-smc-sticky-symbol { font-size: 11px; opacity: .75; }
.kazzylen-smc-sticky-trigger .kazzylen-smc-sticky-chevron { font-size: 9px; opacity: .7; transform: rotate(-90deg); display: inline-block; }
.kazzylen-smc-sticky-trigger[aria-expanded="true"] .kazzylen-smc-sticky-chevron { transform: rotate(90deg); }

/* ── Sticky dropdown list ────────────────────────────────────────────────── */
.kazzylen-smc-sticky-list {
	position: absolute;
	top: 50%;
	transform: translateY(-50%) translateX(8px);
	min-width: 220px;
	max-height: 340px;
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0,0,0,.18);
	list-style: none;
	padding: 8px;
	opacity: 0;
	transition: opacity .18s, transform .18s;
	pointer-events: none;
}
.kazzylen-smc-pos--sticky-right .kazzylen-smc-sticky-list {
	right: calc(100% + 6px);
	left: auto;
	transform: translateY(-50%) translateX(-8px);
}
.kazzylen-smc-pos--sticky-left .kazzylen-smc-sticky-list {
	left: calc(100% + 6px);
	right: auto;
	transform: translateY(-50%) translateX(8px);
}
.kazzylen-smc-sticky-list.is-open {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
	pointer-events: auto;
}
.kazzylen-smc-sticky-list::-webkit-scrollbar { width: 4px; }
.kazzylen-smc-sticky-list::-webkit-scrollbar-thumb { background: #d0bef5; border-radius: 4px; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.kazzylen-smc-fab { height: 44px; padding: 0 14px; font-size: 13px; }
	.kazzylen-smc-float-list { min-width: 190px; }

	/* On mobile, middle positions shift to bottom */
	.kazzylen-smc-pos--middle-right { top: auto; bottom: 20px; right: 16px; transform: none; }
	.kazzylen-smc-pos--middle-left  { top: auto; bottom: 20px; left: 16px;  transform: none; }
	.kazzylen-smc-pos--middle-right .kazzylen-smc-float-list,
	.kazzylen-smc-pos--middle-left  .kazzylen-smc-float-list {
		position: absolute;
		top: auto;
		bottom: calc(100% + 10px);
		left: 0;
		right: auto;
		transform: translateY(6px) scale(.97);
	}
	.kazzylen-smc-pos--middle-right .kazzylen-smc-float-list.is-open,
	.kazzylen-smc-pos--middle-left  .kazzylen-smc-float-list.is-open {
		transform: translateY(0) scale(1);
	}
}

/* ── Inline switcher (shortcode + widget) ───────────────────────────────── */
.kazzylen-smc-inline { display: inline-block; position: relative; font-family: inherit; }

/* Dropdown */
.kazzylen-smc-inline--dropdown .kazzylen-smc-trigger {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 7px 12px; border: 1px solid #ddd; border-radius: 6px;
	background: #fff; cursor: pointer; font-size: 14px; line-height: 1;
	transition: border-color .15s, box-shadow .15s;
}
.kazzylen-smc-inline--dropdown .kazzylen-smc-trigger:hover,
.kazzylen-smc-inline--dropdown .kazzylen-smc-trigger[aria-expanded="true"] {
	border-color: #7f54b3; box-shadow: 0 0 0 2px rgba(127,84,179,.15);
}
.kazzylen-smc-inline--dropdown .kazzylen-smc-chevron { font-size: 10px; color: #888; }
.kazzylen-smc-inline--dropdown .kazzylen-smc-dropdown {
	position: absolute; top: calc(100% + 4px); left: 0; z-index: 9999;
	min-width: 180px; background: #fff; border: 1px solid #ddd;
	border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
	list-style: none; margin: 0; padding: 4px 0; max-height: 280px; overflow-y: auto;
}
.kazzylen-smc-inline--dropdown .kazzylen-smc-option { margin: 0; }
.kazzylen-smc-inline--dropdown .kazzylen-smc-option-link {
	display: flex; align-items: center; gap: 6px;
	padding: 8px 14px; text-decoration: none; color: inherit; font-size: 13px;
	transition: background .1s;
}
.kazzylen-smc-inline--dropdown .kazzylen-smc-option-link:hover,
.kazzylen-smc-inline--dropdown .kazzylen-smc-option.is-active .kazzylen-smc-option-link {
	background: #f5f0fa;
}
.kazzylen-smc-inline--dropdown .kazzylen-smc-check { margin-left: auto; color: #7f54b3; font-weight: 700; }

/* List style */
.kazzylen-smc-inline--list {
	list-style: none; margin: 0; padding: 0;
}
.kazzylen-smc-inline--list .kazzylen-smc-option { margin: 0; border-bottom: 1px solid #f0f0f0; }
.kazzylen-smc-inline--list .kazzylen-smc-option:last-child { border-bottom: none; }
.kazzylen-smc-inline--list .kazzylen-smc-option-link {
	display: flex; align-items: center; gap: 6px;
	padding: 8px 4px; text-decoration: none; color: inherit; font-size: 14px;
}
.kazzylen-smc-inline--list .kazzylen-smc-option.is-active .kazzylen-smc-option-link { font-weight: 700; color: #7f54b3; }
.kazzylen-smc-inline--list .kazzylen-smc-check { margin-left: auto; color: #7f54b3; }

/* Buttons style */
.kazzylen-smc-inline--buttons {
	display: flex; flex-wrap: wrap; gap: 6px;
}
.kazzylen-smc-inline--buttons .kazzylen-smc-btn {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 6px 12px; border: 1px solid #ddd; border-radius: 20px;
	background: #fff; text-decoration: none; color: inherit; font-size: 13px;
	transition: border-color .15s, background .15s;
}
.kazzylen-smc-inline--buttons .kazzylen-smc-btn:hover { border-color: #7f54b3; background: #f5f0fa; }
.kazzylen-smc-inline--buttons .kazzylen-smc-btn.is-active {
	border-color: #7f54b3; background: #7f54b3; color: #fff;
}
