/* ==========================================================================
   Website assistant: launcher, chat panel, messages, quick replies.
   Theme colours (navy · maroon · ivory). Full-screen on phones.
   ========================================================================== */

.gbc {
	--gc-navy: #0c1d38; --gc-navy-2: #13294d; --gc-maroon: #5b1423; --gc-maroon-2: #7a1d31;
	--gc-ivory: #f6efdf; --gc-paper: #fffdf8; --gc-ink: #14233d; --gc-line: rgba(20, 35, 61, .12);
	--gc-ease: cubic-bezier(.2, .7, .2, 1);
	position: fixed; right: 20px; bottom: 20px; z-index: 99998;
	font-family: var(--font-sans, Inter, system-ui, sans-serif);
}
.gbc *, .gbc *::before, .gbc *::after { box-sizing: border-box; }
.gbc [hidden] { display: none !important; }

/* ---------- Launcher ---------- */
.gbc__launch {
	position: relative; display: grid; place-items: center; width: 60px; height: 60px; border: 0; border-radius: 50%; cursor: pointer;
	background: linear-gradient(160deg, var(--gc-maroon-2), var(--gc-maroon)); color: var(--gc-ivory);
	box-shadow: 0 14px 30px -10px rgba(12, 29, 56, .65), 0 0 0 1px rgba(246, 239, 223, .12);
	transition: transform .4s var(--gc-ease), box-shadow .4s var(--gc-ease);
}
.gbc__launch:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 20px 36px -12px rgba(12, 29, 56, .7); }
.gbc__launch:focus-visible { outline: 2px solid var(--gc-maroon); outline-offset: 4px; }
.gbc__launch-ico { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .45s var(--gc-ease), opacity .3s; }
.gbc__launch-ico--close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.gbc.is-open .gbc__launch-ico--open { opacity: 0; transform: rotate(90deg) scale(.6); }
.gbc.is-open .gbc__launch-ico--close { opacity: 1; transform: none; }
.gbc__ping {                      /* a soft ring that invites the first click, stops once opened */
	position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(233, 205, 209, .55);
	animation: gbcPing 2.6s var(--gc-ease) infinite; pointer-events: none;
}
.gbc.is-open .gbc__ping { display: none; }
@keyframes gbcPing { 0% { transform: scale(.9); opacity: .9; } 80%, 100% { transform: scale(1.35); opacity: 0; } }

/* ---------- Panel ---------- */
.gbc__panel {
	position: absolute; right: 0; bottom: 76px; width: 370px; height: min(560px, calc(100vh - 120px));
	display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; background: var(--gc-paper); color: var(--gc-ink);
	box-shadow: 0 40px 80px -24px rgba(7, 18, 37, .55), 0 0 0 1px rgba(20, 35, 61, .08);
	transform-origin: bottom right; opacity: 0; transform: translateY(18px) scale(.96);
	transition: opacity .35s ease, transform .55s var(--gc-ease), visibility 0s linear .35s; visibility: hidden;
}
.gbc.is-open .gbc__panel { opacity: 1; transform: none; visibility: visible; transition: opacity .35s ease, transform .55s var(--gc-ease), visibility 0s; }

.gbc__head {
	position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 16px 15px; flex: 0 0 auto;
	background: radial-gradient(260px 120px at 100% 0%, rgba(122, 29, 49, .6), transparent 70%), linear-gradient(170deg, var(--gc-navy-2), var(--gc-navy));
	color: var(--gc-ivory);
}
.gbc__avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(233, 205, 209, .16); color: #e9cdd1; flex: 0 0 38px; }
.gbc__who { display: grid; gap: 2px; min-width: 0; flex: 1; }
.gbc__who strong { font: 700 15px/1.25 var(--font-serif, Georgia, serif); }
.gbc__who span { font-size: 12px; color: rgba(246, 239, 223, .75); }
.gbc__close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--gc-ivory); cursor: pointer; transition: background .3s, transform .4s var(--gc-ease); }
.gbc__close:hover { background: rgba(246, 239, 223, .12); transform: rotate(90deg); }
.gbc__close:focus-visible { outline: 2px solid #e9cdd1; outline-offset: 2px; }

/* ---------- Messages ---------- */
.gbc__log { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 12px; background: #f4eee0; }
.gbc__msg { display: flex; flex-direction: column; gap: 8px; max-width: 88%; animation: gbcIn .5s var(--gc-ease) both; }
.gbc__msg--bot { align-self: flex-start; }
.gbc__msg--me { align-self: flex-end; align-items: flex-end; }
.gbc__bubble {
	padding: 11px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere;
	box-shadow: 0 1px 2px rgba(20, 35, 61, .08);
}
.gbc__msg--bot .gbc__bubble { background: var(--gc-paper); color: var(--gc-ink); border-top-left-radius: 3px; }
.gbc__msg--me .gbc__bubble { background: var(--gc-maroon); color: var(--gc-ivory); border-top-right-radius: 3px; }
.gbc__more { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 2px; padding: 8px 12px; border-radius: 999px; background: var(--gc-navy); color: var(--gc-ivory); font: 600 12.5px/1 var(--font-sans); text-decoration: none; transition: background .3s, transform .3s var(--gc-ease); }
.gbc__more:hover { background: var(--gc-maroon); transform: translateY(-1px); }
.gbc__more:focus-visible { outline: 2px solid var(--gc-maroon); outline-offset: 2px; }
.gbc__more svg { width: 13px; height: 13px; }
.gbc__wa { background: #1f7a52; }
.gbc__wa:hover { background: #17603f; }
.gbc__typing { display: inline-flex; gap: 5px; padding: 12px 14px; background: var(--gc-paper); border-radius: 12px; border-top-left-radius: 3px; box-shadow: 0 1px 2px rgba(20, 35, 61, .08); }
.gbc__typing span { width: 7px; height: 7px; border-radius: 50%; background: #8d96a6; animation: gbcDot 1.1s ease-in-out infinite; }
.gbc__typing span:nth-child(2) { animation-delay: .15s; }
.gbc__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes gbcDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes gbcIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Quick replies ---------- */
.gbc__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 6px; background: var(--gc-paper); border-top: 1px solid var(--gc-line); flex: 0 0 auto; }
.gbc__chips:empty { display: none; }
.gbc__chip {
	padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(91, 20, 35, .25); background: transparent; color: var(--gc-maroon);
	font: 600 12.5px/1.2 var(--font-sans); cursor: pointer; animation: gbcIn .45s var(--gc-ease) both;
	transition: background .3s, color .3s, border-color .3s, transform .3s var(--gc-ease);
}
.gbc__chip:nth-child(2) { animation-delay: .05s; } .gbc__chip:nth-child(3) { animation-delay: .1s; }
.gbc__chip:nth-child(4) { animation-delay: .15s; } .gbc__chip:nth-child(5) { animation-delay: .2s; }
.gbc__chip:hover { background: var(--gc-maroon); color: var(--gc-ivory); border-color: var(--gc-maroon); transform: translateY(-1px); }
.gbc__chip:focus-visible { outline: 2px solid var(--gc-maroon); outline-offset: 2px; }

/* ---------- Input ---------- */
.gbc__form { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; background: var(--gc-paper); border-top: 1px solid var(--gc-line); flex: 0 0 auto; }
.gbc__form input {
	flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid #d5cbb9; border-radius: 999px; background: #fff;
	font: 400 15px/1 var(--font-sans); color: var(--gc-ink); transition: border-color .25s, box-shadow .25s;
}
.gbc__form input:focus { outline: none; border-color: var(--gc-maroon); box-shadow: 0 0 0 3px rgba(91, 20, 35, .14); }
.gbc__send {
	display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 50%; cursor: pointer;
	background: var(--gc-maroon); color: var(--gc-ivory); transition: background .3s, transform .3s var(--gc-ease);
}
.gbc__send:hover { background: var(--gc-maroon-2); transform: translateY(-1px); }
.gbc__send:focus-visible { outline: 2px solid var(--gc-maroon); outline-offset: 2px; }

/* ---------- Phones: a full-screen sheet ---------- */
@media (max-width: 560px) {
	.gbc { right: 12px; bottom: 12px; }
	.gbc__panel {
		position: fixed; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0;
		transform-origin: bottom center; transform: translateY(100%);
	}
	.gbc.is-open .gbc__panel { transform: none; }
	.gbc.is-open .gbc__launch { opacity: 0; pointer-events: none; }
	.gbc__launch { transition: opacity .3s, transform .4s var(--gc-ease), box-shadow .4s; }
	.gbc__form input { font-size: 16px; }    /* stops iOS zooming in */
	.gbc__msg { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
	.gbc *, .gbc *::before, .gbc *::after { animation: none !important; transition-duration: .01ms !important; }
	.gbc__panel { transform: none !important; }
}

/* Visually hidden label for the input (screen readers still read it). */
.gbc .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;
}
