/* ==========================================================================
   Go Keys inside HiverGo Beta  (@gokeys/gokeys.css)
   Key layout + faces are the original Go Keys design, unchanged. Only the selectors are scoped to
   .-foot-go-keys so nothing leaks into the rest of the platform.
   ========================================================================== */
.-foot-go-keys, .key-pop, .accent-strip, .word-menu, .-foot-note-guess, .-go-clip {
  --key-bg: #ffffff0a; --aqua: #73fff1; --azure: #67ABCD; --orange: #fbb842; --forest: #24c339; --salmon: #ff9e9e;
  --purple: #9d67cd; --delete: #E87979; --yellow: #ffc93c; --blue: #0aa8fc; --ink: #00202f; --note: #b78cf2;
  --surface: #1c1c1c; --surface-2: #262626; --surface-3: #303030; --transparent: #0000;
}

/* ---- keyboard (scoped) ---- */
.-foot-go-keys .keyboard-area {
	position: relative;
	touch-action: none;
	flex-shrink: 0;
}
.-foot-go-keys #glide-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 150;
}
.-foot-go-keys .keys-wrapper {
	/* gap: 2.5vw; */
	gap: 2.1875vw;
	display: flex;
	flex-flow: column;
	position: relative;
}
/* ==================== KEYBOARD ROWS ==================== */
.-foot-go-keys .row {
	display: flex;
	justify-content: center;
	width: -webkit-fill-available;
	gap: 1.25vw;
}
/* ==================== KEYS ==================== */
.-foot-go-keys .key {
	--kd: 3.6vw;                                   /* squircle corner */
	color: #fff;
	display: flex;
	height: 11.25vw;
	width: 8.565625vw;
	min-width: 8.565625vw;
	position: relative;
	font-size: 4.6875vw;
	align-items: center;
	justify-content: center;
	background: var(--key-bg);
	clip-path: shape(from 0 var(--kd), curve to var(--kd) 0 with 0 0 / 0 0, hline to calc(100% - var(--kd)), curve to 100% var(--kd) with 100% 0 / 100% 0, vline to calc(100% - var(--kd)), curve to calc(100% - var(--kd)) 100% with 100% 100% / 100% 100%, hline to var(--kd), curve to 0 calc(100% - var(--kd)) with 0 100% / 0 100%, close);
	transition: transform 0.09s cubic-bezier(.2, .9, .2, 1), background-color 0.14s, color 0.14s, opacity 0.2s;
	will-change: transform;
}
@supports not (clip-path: shape(from 0 0, close)) {.-foot-go-keys .key,
.-foot-go-keys .key-pop,
.-foot-go-keys .accent-strip { clip-path: none; border-radius: var(--kd); }
}
.-foot-go-keys .key-circular { --kd: 4.28vw; height: 8.565625vw; }
.-foot-go-keys .-adjust-key { min-width: 12.734375vw; background: var(--transparent); width: 100%; }
.-foot-go-keys .-tall-key { min-height: 11.875vw; }
.-foot-go-keys .key-space { width: 100%; min-width: 28.196875vw; }
/* pressed: the face turns blue and sinks a little; the pop-up shows the lifted key */
.-foot-go-keys .key.down {
	background: var(--blue);
	color: var(--ink);
	transform: scale(0.94);
	transition-duration: 0s;
}
.-foot-go-keys .key.down .key-content { text-shadow: none; }
.-foot-go-keys .key-content { display: flex; align-items: center; justify-content: center; pointer-events: none; }
.-foot-go-keys .key-label .key-content { font-weight: 700; font-size: 4.2vw; letter-spacing: 0.02em; }
.-foot-go-keys .dimmed { opacity: 0.3; }
.-foot-go-keys .key-number { color: var(--forest); font-family: monospace; font-weight: bold; background: unset; }
/* lifted key pop-up (iOS style) */
.-foot-go-keys .emoji-cat { grid-column: 1 / -1; text-transform: capitalize; color: var(--azure); font-size: 3.1vw; padding: 2vw 1vw 0; }
.-foot-go-keys .color-azure { color: var(--azure); }
.-foot-go-keys .color-orange { color: var(--orange); }
.-foot-go-keys .color-forest { color: var(--forest); }
.-foot-go-keys .color-salmon { color: var(--salmon); }
.-foot-go-keys .color-purple { color: var(--purple); }
.-foot-go-keys .color-aqua { color: var(--aqua); }
.-foot-go-keys .color-delete { color: var(--delete); }
.-foot-go-keys .color-white { color: #fff; }
.-foot-go-keys .color-yellow { color: var(--yellow); }
.-foot-go-keys .no-bg {
	background: var(--transparent);
	box-shadow: none;
}
.-foot-go-keys .glow-orange {
	text-shadow: 0 0 8px var(--orange), 0 0 12px var(--orange);
}
.-foot-go-keys .glow-purple {
	text-shadow: 0 0 8px var(--purple), 0 0 12px var(--purple);
}

/* ---- floating key pop-up / accents / word menu (appended to <body>, so not scoped) ---- */
.key-pop {
	--kd: 4.6vw;
	position: fixed;
	z-index: 400;
	pointer-events: none;
	display: grid;
	place-items: center;
	color: var(--ink);
	background: var(--blue);
	font-weight: 600;
	opacity: 0;
	transform: translateY(32%) scale(0.55);
	transform-origin: 50% 100%;
	transition: opacity 0.06s, transform 0.12s cubic-bezier(.2, .9, .2, 1.25);
	clip-path: shape(from 0 var(--kd), curve to var(--kd) 0 with 0 0 / 0 0, hline to calc(100% - var(--kd)), curve to 100% var(--kd) with 100% 0 / 100% 0, vline to calc(100% - var(--kd)), curve to calc(100% - var(--kd)) 100% with 100% 100% / 100% 100%, hline to var(--kd), curve to 0 calc(100% - var(--kd)) with 0 100% / 0 100%, close);
}
.key-pop.on { opacity: 1; transform: none; }
.key-pop span { line-height: 1; }

/* long-press accents */
.accent-strip {
	--kd: 3.8vw;
	position: fixed;
	z-index: 410;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 1.5vw;
	pointer-events: none;
	background: var(--surface-2);
	color: #fff;
	opacity: 0;
	transform: translateY(8px) scale(0.9);
	transform-origin: 50% 100%;
	transition: opacity 0.08s, transform 0.14s cubic-bezier(.2, .9, .2, 1.2);
	clip-path: shape(from 0 var(--kd), curve to var(--kd) 0 with 0 0 / 0 0, hline to calc(100% - var(--kd)), curve to 100% var(--kd) with 100% 0 / 100% 0, vline to calc(100% - var(--kd)), curve to calc(100% - var(--kd)) 100% with 100% 100% / 100% 100%, hline to var(--kd), curve to 0 calc(100% - var(--kd)) with 0 100% / 0 100%, close);
}
.accent-strip.on { opacity: 1; transform: none; }
.accent-strip span { flex: 1; display: grid; place-items: center; height: 82%; }
.accent-strip span.sel { background: var(--yellow); color: #1c1400; clip-path: var(--squircle-small); }
/* ==================== WORD MENU (long-press a guess) ==================== */
.word-menu {
	position: fixed;
	z-index: 260;
	display: flex;
	align-items: center;
	gap: 2vw;
	padding: 1.2vw 1.2vw 1.2vw 4.5vw;
	background: var(--surface-2);
	color: var(--yellow);
	font-weight: 600;
	font-size: 4vw;
	opacity: 0;
	pointer-events: none;
	transform: translateY(6px) scale(0.94);
	transform-origin: 50% 100%;
	transition: opacity 0.1s, transform 0.14s cubic-bezier(.2, .9, .2, 1.2);
}
.word-menu.on { opacity: 1; pointer-events: auto; transform: none; }
.wm-word { max-width: 58vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-menu .wm-erase { width: 10.6vw; height: 10.6vw; display: grid; place-items: center; background: #3a1c26; color: var(--delete); }
.word-menu .wm-erase:active { transform: scale(0.94); }


/* ---- guess bar (lives in the notepad foot row) ---- */
.-foot-note-guess .guess-word {
	flex: 1 1 0;
	min-width: 0;
	text-align: center;
	font-size: 3.75vw;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #8d8d96;
	transition: color 0.1s, transform 0.08s;
}
.-foot-note-guess .guess-word[data-slot="1"] { flex: 1.45 1 0; }
.-foot-note-guess .guess-word.primary { color: var(--yellow); font-weight: 600; }
.-foot-note-guess.msg .guess-word[data-slot="1"] { color: var(--note); font-weight: 500; }
.-foot-note-guess .guess-word.add { color: var(--blue); }
.-foot-note-guess .guess-word.empty { visibility: hidden; }
.-foot-note-guess .guess-word:active { transform: scale(1.08); color: var(--aqua); }
.-foot-note-guess .guess-separator { width: 1px; height: 55%; background: #ffffff1c; flex: none; }

/* ---- icons on the keys: the same Material Symbols Rounded font HiverGo uses ---- */
.-foot-go-keys .material-symbols-rounded { font-size: 22px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; pointer-events: none; }

/* ---- guess bar: takes the notepad's bottom row after the first divider ---- */
.-foot-note-guess { display: none; flex: 1 1 0; min-width: 0; align-items: center; align-self: stretch; gap: 1.25vw; padding: 0 1.25vw; }
.---guessing > .-foot-note-guess { display: flex; }
.---guessing > .-vertical-divider ~ .-vertical-divider,
.---guessing > .-vertical-divider ~ *:not(.-foot-note-guess):not(.-vertical-divider) { display: none !important; }

/* ---- clipboard (.-go-keys-tools): sideways cards, HiverGo punch holes ---- */
.-go-keys-tools {
	display: flex;
	align-items: stretch;
	gap: 3.125vw;
	padding: 0 3.125vw;
	box-sizing: border-box;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
	overscroll-behavior-x: contain;
}
.-go-keys-tools::-webkit-scrollbar { display: none; }
.-go-clip-card {
	flex: 0 0 56vw;
	display: flex;
	flex-flow: column;
	justify-content: space-between;
	gap: 3.125vw;
	padding: 3.125vw;
	box-sizing: border-box;
	background: #ffffff0a;
	scroll-snap-align: start;
	position: relative;
	min-height: 0;
	clip-path: var(--squircle);
}
.-go-clip-card.---pinned { background: #73fff114; }
.-go-clip-actions {
	min-width: -webkit-fill-available;
	justify-content: flex-start;
}
.-go-clip-hint { color: #8d8d96; font-size: 3.4375vw; line-height: 1.4; }
.-go-clip-text {
	flex: 1; overflow: hidden; font-size: 3.75vw; line-height: 1.4; color: #e8e8ee; white-space: pre-wrap; word-break: break-word;
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5;
}
.-go-clip-text:active { color: var(--aqua); }
.-go-clip-foot { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.-go-clip-meta { display: flex; align-items: center; gap: 1.5vw; font-size: 2.8125vw; color: #8d8d96; }
.-go-clip-meta .material-symbols-rounded { font-size: 3.75vw; }
.-go-clip-holes { display: flex; gap: 2.5vw; margin-top: auto; }

/* ---- emoji / stickers (.-go-emoji-grid): one vertical list, a text heading per category ---- */
.-go-emoji-grid { display: flex; flex-flow: column; min-height: 0; box-sizing: border-box; gap: 2vw; position: relative; }
.-go-emoji-cells {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
  padding: 0 3.125vw 3.125vw; box-sizing: border-box;
}
.-go-emoji-cells::-webkit-scrollbar { display: none; }
.-go-emoji-head {
  position: sticky; top: 0; z-index: 1; padding: 3.125vw 1.25vw 1.5625vw; font-size: 3.4375vw; font-weight: 650; letter-spacing: 0.15625vw;
  text-transform: uppercase; color: #8d8d96; background: var(--app-theme);
}
.-go-emoji-set { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5vw; }
.-go-emoji-cell { aspect-ratio: 1 / 1; display: grid; place-items: center; font-size: 7vw; border-radius: 3vw; transition: transform 0.07s, background 0.1s; }
.-go-emoji-cell:active { transform: scale(1.2); background: #ffffff14; }
.-go-emoji-note { grid-column: 1 / -1; padding: 2vw 1.25vw 3vw; color: #8d8d96; font-size: 3.4375vw; }

/* ---- suggestions for search / form fields: the existing floating guesser, wider, holding the Go Keys guess bar ---- */
.-search-guesser.-go-field-guess {
	left: 50vw; width: 87.5vw; max-width: 87.5vw; padding: 0 2.5vw; box-sizing: border-box; gap: 1.25vw; z-index: 95500;
	transform: translate(-50%, calc(-100% - 3.125vw)) scale(.92);
}
.-search-guesser.-go-field-guess.---show-search-guesser { transform: translate(-50%, calc(-100% - 3.125vw)) scale(1); }
.-search-guesser.-go-field-guess::after { left: var(--go-arrow, 50%); }
.-go-field-guess .-foot-note-guess { display: flex; flex: 1 1 0; min-width: 0; padding: 0; }
.-go-term { display: none; flex: 0 0 auto; max-width: 38%; min-width: 0; align-items: center; font-size: 3.75vw; font-weight: 500; padding: 0 0 0 2.5vw; border-left: 0.3125vw solid #ffffff1c; overflow: hidden; }
.-go-term.---on { display: flex; }
html.---go-field .-search-guesser:not(.-go-field-guess) { display: none !important; }

/* ---- long-press word menu: squircle + trash icon ---- */
.word-menu { clip-path: var(--squircle); border-radius: 0; }
.word-menu .wm-erase { clip-path: var(--squircle-small); border-radius: 0; cursor: auto; }
.word-menu .wm-erase .material-symbols-rounded { font-size: 5.6vw; color: var(--delete); font-variation-settings: 'FILL' 0, 'wght' 400; pointer-events: none; }
