/* Finnrick skin for the help widget — navy / cream / gold, sharp ruled cards,
   uppercase tracked labels, circle-arrow affordances (finnrick.com language).
   Loaded after stg-chat.css by fr-fixes.php. Tawk status drives [data-status]. */
html body .stg-chat {
	--n: #101C2E; --n2: #1D2D44; --g: #D9A84D; --gd: #C6942F;
	--cream: #F5F3EF; --c2: #EFEDE6; --line: #C6CAD2; --line2: #E4E1D7;
	--txt: #151923; --mut: #5A6372; --st: #8E99AD;
	--ease: cubic-bezier(.2, .8, .2, 1);
	font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif; color: var(--txt);
}
html body .stg-chat[data-status="online"] { --st: #2FAE6B; }
html body .stg-chat[data-status="away"] { --st: #E0A43A; }
html body .stg-chat[data-status="offline"] { --st: #8E99AD; }

/* ── Launcher: navy pill, gold tile, live status ─────────────── */
html body .stg-chat .stg-chat-launch {
	display: flex !important; align-items: center; gap: 12px; width: auto !important; height: 56px !important;
	padding: 0 22px 0 8px !important; border-radius: 999px !important; overflow: hidden;
	background: var(--n) !important; color: #fff !important; text-transform: none !important; letter-spacing: normal !important;
	box-shadow: 0 16px 32px -16px rgba(16, 28, 46, .9), inset 0 0 0 1px rgba(255, 255, 255, .07) !important;
	transition: transform .3s var(--ease), box-shadow .3s, padding .35s var(--ease) !important;
	animation: frChatIn .7s var(--ease) .9s backwards;
}
html body .stg-chat .stg-chat-launch::after { display: none; } /* ring lives on the tile */
html body .stg-chat .stg-chat-launch::before { /* hover glint */
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(110deg, transparent 35%, rgba(217, 168, 77, .28) 50%, transparent 65%);
	transform: translateX(-130%); transition: transform .9s var(--ease);
}
html body .stg-chat .stg-chat-launch:hover { transform: translateY(-3px); box-shadow: 0 22px 38px -16px rgba(16, 28, 46, .95), inset 0 0 0 1px rgba(217, 168, 77, .35) !important; }
html body .stg-chat .stg-chat-launch:hover::before { transform: translateX(130%); }
html body .stg-chat .stg-chat-launch:focus-visible { outline: 2px solid var(--g); outline-offset: 3px; }
@keyframes frChatIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }

.stg-chat .stg-chat-tile {
	position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	background: var(--g); color: var(--n); transition: background .3s, transform .35s var(--ease);
}
.stg-chat .stg-chat-tile svg { position: absolute; width: 21px !important; height: 21px !important; stroke-width: 2; }
.stg-chat .stg-chat-tile::after { /* gold attention ring, three pulses */
	content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--g); opacity: 0; pointer-events: none;
	animation: frChatRing 2.4s var(--ease) 2.2s 3;
}
@keyframes frChatRing { 0% { transform: scale(1); opacity: .75; } 100% { transform: scale(1.9); opacity: 0; } }
.stg-chat .stg-chat-launch:hover .stg-chat-tile { transform: rotate(-8deg) scale(1.05); }
.stg-chat .stg-chat-st { /* agent status dot */
	position: absolute; right: -1px; top: -1px; width: 12px; height: 12px; border-radius: 50%;
	background: var(--st); border: 2px solid var(--n); opacity: 0; transition: opacity .3s, background .3s;
}
.stg-chat[data-status] .stg-chat-st { opacity: 1; }
.stg-chat[data-status="online"] .stg-chat-st { animation: frChatLive 2.2s ease-in-out infinite; }
@keyframes frChatLive { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 174, 107, .55); } 50% { box-shadow: 0 0 0 5px rgba(47, 174, 107, 0); } }

.stg-chat .stg-chat-lbl {
	display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; white-space: nowrap;
	max-width: 180px; transition: max-width .4s var(--ease), opacity .25s, margin .4s var(--ease);
}
.stg-chat .stg-chat-lbl small { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #AEB7C5; }
.stg-chat[data-status="online"] .stg-chat-lbl small { color: #7FD3A5; }
.stg-chat .stg-chat-lbl b { margin-top: 3px; font-size: 15px; font-weight: 600; color: #fff; }

/* open: pill collapses to its tile, chat icon morphs to × */
html body .stg-chat.is-open .stg-chat-launch { padding: 0 8px !important; }
.stg-chat.is-open .stg-chat-lbl { max-width: 0; opacity: 0; margin-left: -12px; }
.stg-chat.is-open .stg-chat-tile { background: #fff; transform: rotate(90deg); }
.stg-chat.is-open .stg-chat-tile::after { animation: none; }

/* ── Panel ──────────────────────────────────────────────────── */
html body .stg-chat .stg-chat-panel {
	width: 360px; bottom: 72px; background: var(--cream) !important; border: 1px solid var(--n) !important; border-radius: 2px !important;
	box-shadow: 8px 8px 0 -1px rgba(16, 28, 46, .10), 0 34px 64px -30px rgba(16, 28, 46, .65) !important;
	animation: frChatPanel .34s var(--ease);
}
html body .stg-chat .stg-chat-panel::before { display: none; }
@keyframes frChatPanel { from { opacity: 0; transform: translateY(14px); clip-path: inset(40% 0 0 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }

.stg-chat .stg-chat-head { position: relative; align-items: center; gap: 14px; padding: 18px 16px 18px 18px; background: var(--n); }
.stg-chat .stg-chat-head::after { content: ""; position: absolute; left: 18px; bottom: 0; width: 64px; height: 2px; background: var(--g); transform-origin: left; animation: frChatRule .7s var(--ease) .15s both; }
@keyframes frChatRule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
html body .stg-chat .stg-chat-mark { width: 42px; height: 42px; border-radius: 2px; background: #fff; box-shadow: none; padding: 5px; }
.stg-chat .stg-chat-status { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.stg-chat .stg-chat-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--st); }
.stg-chat .stg-chat-status em { font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--g); }
html body .stg-chat .stg-chat-intro strong { font-family: inherit; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
html body .stg-chat .stg-chat-intro > span:not(.stg-chat-status) { font-size: 13px; color: #C7CDD9; }
html body .stg-chat .stg-chat-x { color: #C7CDD9 !important; border-radius: 50% !important; align-self: flex-start; margin: -6px -6px 0 0; }
html body .stg-chat .stg-chat-x:hover { background: rgba(255, 255, 255, .1) !important; color: #fff !important; }

.stg-chat .stg-chat-options { gap: 10px; padding: 16px 14px 14px; }
html body .stg-chat .stg-chat-opt {
	position: relative; overflow: hidden; gap: 14px; padding: 14px !important;
	background: #fff !important; border: 1px solid var(--line) !important; border-radius: 2px !important; color: var(--txt) !important;
	transition: border-color .25s, transform .3s var(--ease), box-shadow .3s !important;
	animation: frChatOpt .45s var(--ease) backwards;
}
.stg-chat .stg-chat-opt:nth-child(1) { animation-delay: .08s; }
.stg-chat .stg-chat-opt:nth-child(2) { animation-delay: .14s; }
.stg-chat .stg-chat-opt:nth-child(3) { animation-delay: .2s; }
@keyframes frChatOpt { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stg-chat .stg-chat-opt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--g); transform: scaleY(0); transition: transform .3s var(--ease); }
html body .stg-chat .stg-chat-opt:hover, html body .stg-chat .stg-chat-opt:focus-visible {
	border-color: var(--n) !important; background: #fff !important; transform: translateY(-2px); box-shadow: 0 14px 26px -20px rgba(16, 28, 46, .7) !important;
}
.stg-chat .stg-chat-opt:hover::before, .stg-chat .stg-chat-opt:focus-visible::before { transform: scaleY(1); }
html body .stg-chat .stg-chat-ico { width: 42px; height: 42px; border-radius: 2px; background: var(--c2); color: var(--n); border: 1px solid var(--line2); transition: background .3s, color .3s; }
html body .stg-chat .stg-chat-opt:hover .stg-chat-ico { background: var(--n); color: var(--g); border-color: var(--n); }
html body .stg-chat .stg-chat-opt.is-tg .stg-chat-ico { background: #E8F5FC; color: #1B8BC6; }
.stg-chat .stg-chat-txt strong { font-size: 15px; color: var(--n); }
.stg-chat .stg-chat-txt em { font-size: 13px; color: var(--mut); }
html body .stg-chat .stg-chat-dot { background: var(--st); box-shadow: 0 0 0 3px rgba(16, 28, 46, .06); }
.stg-chat:not([data-status]) .stg-chat-dot { background: #2FAE6B; }
html body .stg-chat .stg-chat-go {
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--n);
	color: var(--n); font-size: 14px; line-height: 1; transition: background .3s, color .3s, transform .35s var(--ease);
}
html body .stg-chat .stg-chat-opt:hover .stg-chat-go { background: var(--n); color: #fff; transform: rotate(-45deg); }
html body .stg-chat .stg-chat-opt.is-tg:hover .stg-chat-go { transform: none; }
html body .stg-chat .stg-chat-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line2); font-size: 12px !important; line-height: 1.5; color: var(--mut) !important; background: transparent; }

/* ── Phones: compact navy circle above Ustone's tab bar ───────── */
@media (max-width: 991px) {
	html body .stg-chat .stg-chat-launch { width: 56px !important; height: 56px !important; padding: 0 !important; justify-content: center; }
	.stg-chat .stg-chat-lbl { display: none; }
	html body .stg-chat .stg-chat-panel { bottom: 68px; }
}
@media (max-width: 480px) {
	html body .stg-chat .stg-chat-panel { bottom: calc(146px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
	html body .stg-chat .stg-chat-launch, .stg-chat .stg-chat-tile::after, .stg-chat .stg-chat-st,
	html body .stg-chat .stg-chat-panel, .stg-chat .stg-chat-head::after, html body .stg-chat .stg-chat-opt { animation: none !important; }
	html body .stg-chat .stg-chat-launch, .stg-chat .stg-chat-tile, .stg-chat .stg-chat-lbl, html body .stg-chat .stg-chat-opt, html body .stg-chat .stg-chat-go { transition: none !important; }
}
