/* UC Song Modes: "אקורדים בצד" + צלילי פתיחה */

/* ── אקורדים בצד ── */
.uc-side-view { display: none; }
.achord-song-wrapper.uc-side-mode .uc-side-view {
	display: grid;
	grid-template-columns: minmax(0, max-content) minmax(5em, max-content);
	column-gap: 2.2em;
	row-gap: .15em;
	justify-content: start;
	align-items: baseline;
	font-family: var(--font-body);
	font-size: var(--base-font-size, 1em);
	line-height: 1.6;
}
.achord-song-wrapper.uc-side-mode #achord-content-area > .achord-version { display: none !important; }
.uc-side-row { display: contents; }
.uc-side-lyr { color: var(--text-primary); overflow-wrap: anywhere; }
.uc-side-chd { text-align: left; display: flex; flex-wrap: wrap; gap: .1em .6em; justify-content: flex-start; }
.uc-side-chord {
	font: inherit;
	font-family: var(--font-chord);
	font-weight: 700;
	font-size: .85em;
	color: var(--text-chord);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font-variant-numeric: tabular-nums;
}
.uc-side-chord:hover { text-decoration: underline; }
.uc-side-chord:focus-visible { outline: 2px solid var(--text-chord); outline-offset: 2px; border-radius: 3px; }
.uc-side-gap { grid-column: 1 / -1; height: .9em; }
.uc-side-full { grid-column: 1 / -1; }
#uc-side-toggle.active {
	background-color: var(--accent-primary);
	color: var(--accent-primary-text);
	border-color: var(--accent-primary);
}
@media (max-width: 480px) {
	/* בטלפון: מילים קצת קטנות יותר, ועמודת האקורדים נשברת לשתי שורות לפני שהיא דוחקת את המילים */
	.achord-song-wrapper.uc-side-mode .uc-side-view {
		font-size: calc(var(--base-font-size, 26px) * .82);
		column-gap: .9em;
		grid-template-columns: minmax(0, 1fr) auto;
	}
	.uc-side-chd { max-width: 6.2em; gap: 0 .45em; }
}

/* ── שורת צלילי הפתיחה ── */
.uc-fn {
	margin: .45em 0 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: .35em .5em;
	font-size: .95rem;
}
.uc-fn.is-empty .uc-fn-label, .uc-fn.is-empty .uc-fn-names, .uc-fn.is-empty .uc-fn-play { display: none; }
.uc-fn-label { opacity: .75; }
.uc-fn-names, .uc-fn-play, .uc-fn-edit {
	font: inherit;
	background: none;
	color: inherit;
	cursor: pointer;
	border-radius: 999px;
}
.uc-fn-names {
	border: 1px solid rgba(216, 168, 110, .6);
	padding: .05em .75em;
	font-weight: 700;
	color: var(--text-chord, inherit);
	letter-spacing: .02em;
}
.uc-fn-play {
	border: 1px solid rgba(216, 168, 110, .6);
	width: 2em; height: 2em;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0;
}
.uc-fn-play svg { width: 1em; height: 1em; }
.uc-fn-edit { border: 1px dashed rgba(216, 168, 110, .8); padding: .05em .7em; font-size: .85em; opacity: .85; }
.uc-fn-names:hover, .uc-fn-play:hover, .uc-fn-edit:hover { border-color: currentColor; opacity: 1; }
.uc-fn button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media print { .uc-fn { display: none; } }

/* ── עורך הצלילים ── */
.uc-fn-modal {
	--m-bg: #fffaf3; --m-fg: #0D1B33; --m-sub: #5a6475; --m-line: #DCD0C1; --m-acc: #B68C64; --m-white: #fff; --m-black: #0D1B33;
	position: fixed; inset: 0; z-index: 10050;
	background: rgba(0, 0, 0, .55);
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	direction: rtl;
}
.uc-fn-modal.is-dark { --m-bg: #16233b; --m-fg: #f1e6d8; --m-sub: #b9c2d0; --m-line: #33445f; --m-acc: #d8a86e; --m-white: #e9e2d6; --m-black: #0a1222; }
.uc-fn-box {
	background: var(--m-bg); color: var(--m-fg);
	border-radius: 16px;
	padding: 18px 18px 14px;
	width: min(520px, 100%);
	max-height: calc(100vh - 32px); overflow: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
	font-family: 'Assistant', 'Assistant-Regular', sans-serif;
}
.uc-fn-box h2 { margin: 0 0 .3em; font-size: 1.3rem; color: var(--m-fg); }
.uc-fn-help { margin: 0 0 .8em; color: var(--m-sub); font-size: .95rem; line-height: 1.5; }
.uc-fn-picked {
	min-height: 2.2em; margin-bottom: .7em;
	padding: .3em .6em;
	border: 1px solid var(--m-line); border-radius: 10px;
	font-size: 1.25rem; font-weight: 700; text-align: center;
}
.uc-fn-picked.is-empty { font-size: .95rem; font-weight: 400; color: var(--m-sub); line-height: 2; }
.uc-kb {
	position: relative;
	height: 150px;
	display: grid; grid-template-columns: repeat(var(--n), 1fr);
	user-select: none; -webkit-user-select: none;
	touch-action: manipulation;
}
.uc-k { border: 0; padding: 0; cursor: pointer; font: inherit; }
.uc-k-w {
	grid-row: 1; grid-column: calc(var(--i) + 1);
	background: var(--m-white);
	border: 1px solid var(--m-line);
	border-radius: 0 0 6px 6px;
	display: flex; align-items: flex-end; justify-content: center;
	padding-bottom: 6px;
	font-size: .72rem; color: #5a6475;
}
.uc-k-b {
	position: absolute; top: 0;
	height: 62%;
	width: calc(100% / var(--n) * .62);
	left: calc(100% / var(--n) * (var(--i) + 1) - 100% / var(--n) * .31);
	background: var(--m-black);
	border-radius: 0 0 5px 5px;
	z-index: 1;
}
.uc-k:active, .uc-k.is-down { background: var(--m-acc); }
.uc-k:focus-visible { outline: 3px solid var(--m-acc); outline-offset: -3px; }
.uc-fn-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.uc-fn-b {
	font: inherit; font-weight: 700; font-size: .95rem;
	padding: .45em 1em; min-height: 40px;
	border-radius: 8px; border: 1px solid var(--m-line);
	background: transparent; color: var(--m-fg); cursor: pointer;
}
.uc-fn-b.uc-fn-primary { background: var(--m-acc); border-color: var(--m-acc); color: #fff; }
.uc-fn-b:disabled { opacity: .6; cursor: default; }
.uc-fn-b:focus-visible { outline: 2px solid var(--m-acc); outline-offset: 2px; }
.uc-fn-msg { margin: .5em 0 0; min-height: 1.2em; text-align: center; color: var(--m-sub); font-size: .9rem; }
