/* InsureGroup AI Chatbot - widget styles. Scoped under .igcb- to avoid theme bleed. */

.igcb-root {
	--igcb-primary: #0e3a5f;
	--igcb-accent: #f0a818;
	--igcb-bg: #ffffff;
	--igcb-surface: #f4f6f9;
	--igcb-text: #1f2a37;
	--igcb-muted: #6b7785;
	--igcb-border: #e4e8ed;
	--igcb-user: var(--igcb-primary);
	--igcb-agent: #0e8a5f;
	--igcb-radius: 18px;
	--igcb-shadow: 0 18px 50px -12px rgba(13, 34, 56, 0.4), 0 6px 16px -8px rgba(13, 34, 56, 0.25);
	position: fixed;
	bottom: 22px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--igcb-text);
}
.igcb-root.igcb-pos-right { right: 22px; }
.igcb-root.igcb-pos-left { left: 22px; }

.igcb-root *,
.igcb-root *::before,
.igcb-root *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- launcher */

.igcb-launcher {
	position: relative;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	color: #fff;
	background: var(--igcb-primary);
	box-shadow: var(--igcb-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: auto;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.igcb-pos-left .igcb-launcher { margin-left: 0; margin-right: auto; }
.igcb-launcher:hover { transform: translateY(-2px) scale(1.04); }
.igcb-launcher:active { transform: scale(.97); }
.igcb-launcher:focus-visible { outline: 3px solid var(--igcb-accent); outline-offset: 3px; }

.igcb-launcher-icon {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .2s ease, transform .25s ease;
}
.igcb-icon-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.igcb-active .igcb-icon-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.igcb-active .igcb-icon-close { opacity: 1; transform: rotate(0) scale(1); }

.igcb-launcher-badge {
	position: absolute;
	top: -2px; right: -2px;
	min-width: 20px; height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--igcb-accent);
	color: #1f2a37;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
}

/* ------------------------------------------------------------------- panel */

.igcb-panel {
	position: absolute;
	bottom: 78px;
	width: 384px;
	max-width: calc(100vw - 32px);
	height: 600px;
	max-height: calc(100vh - 120px);
	background: var(--igcb-bg);
	border-radius: 20px;
	box-shadow: var(--igcb-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(.98);
	transform-origin: bottom right;
	pointer-events: none;
	transition: opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1);
}
.igcb-pos-right .igcb-panel { right: 0; }
.igcb-pos-left .igcb-panel { left: 0; transform-origin: bottom left; }
.igcb-is-open .igcb-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* ------------------------------------------------------------------ header */

.igcb-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 16px 16px 18px;
	color: #fff;
	background:
		radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 45%),
		var(--igcb-primary);
	flex: 0 0 auto;
}
.igcb-header-avatar {
	width: 40px; height: 40px;
	border-radius: 12px;
	background: rgba(255,255,255,.16);
	display: flex; align-items: center; justify-content: center;
	color: var(--igcb-accent);
	flex: 0 0 auto;
}
.igcb-header-text { flex: 1 1 auto; min-width: 0; }
.igcb-header-title { font-weight: 700; font-size: 16px; letter-spacing: .01em; }
.igcb-header-sub {
	display: flex; align-items: center; gap: 6px;
	font-size: 12.5px; opacity: .85; margin-top: 1px;
}
.igcb-dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: #3ad29f;
	box-shadow: 0 0 0 0 rgba(58,210,159,.6);
	animation: igcb-pulse 2s infinite;
}
@keyframes igcb-pulse {
	0% { box-shadow: 0 0 0 0 rgba(58,210,159,.55); }
	70% { box-shadow: 0 0 0 6px rgba(58,210,159,0); }
	100% { box-shadow: 0 0 0 0 rgba(58,210,159,0); }
}
.igcb-header-close {
	background: transparent; border: none; color: #fff; cursor: pointer;
	width: 34px; height: 34px; border-radius: 9px;
	display: flex; align-items: center; justify-content: center;
	opacity: .85; transition: background .15s ease, opacity .15s ease;
	flex: 0 0 auto;
}
.igcb-header-close:hover { background: rgba(255,255,255,.16); opacity: 1; }
.igcb-header-human {
	background: rgba(255,255,255,.12); border: none; color: #fff; cursor: pointer;
	width: 34px; height: 34px; border-radius: 9px;
	display: flex; align-items: center; justify-content: center;
	opacity: .9; transition: background .15s ease, opacity .15s ease;
	flex: 0 0 auto;
}
.igcb-header-human:hover { background: rgba(255,255,255,.22); opacity: 1; }
.igcb-header-human:focus-visible { outline: 2px solid var(--igcb-accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- messages */

.igcb-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px 16px 8px;
	background:
		linear-gradient(180deg, rgba(14,58,95,.035), rgba(14,58,95,0) 90px),
		var(--igcb-surface);
	scroll-behavior: smooth;
}
.igcb-messages::-webkit-scrollbar { width: 8px; }
.igcb-messages::-webkit-scrollbar-thumb { background: rgba(31,42,55,.18); border-radius: 8px; }

.igcb-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin-bottom: 12px;
	animation: igcb-in .28s cubic-bezier(.16,1,.3,1);
}
@keyframes igcb-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}
.igcb-row-user { flex-direction: row-reverse; }

.igcb-avatar {
	width: 28px; height: 28px; border-radius: 50%;
	background: var(--igcb-primary);
	color: var(--igcb-accent);
	display: flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
	margin-bottom: 2px;
}

.igcb-bubble {
	max-width: 80%;
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 14.5px;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
.igcb-bubble-assistant {
	background: #fff;
	border: 1px solid #e7ebf0;
	border-bottom-left-radius: 5px;
	color: var(--igcb-text);
	box-shadow: 0 1px 2px rgba(13,34,56,.05);
}
.igcb-bubble-user {
	background: var(--igcb-user);
	color: #fff;
	border-bottom-right-radius: 5px;
}
.igcb-bubble p { margin: 0 0 8px; }
.igcb-bubble p:last-child { margin-bottom: 0; }
.igcb-bubble ul { margin: 6px 0; padding-left: 18px; }
.igcb-bubble li { margin: 2px 0; }
.igcb-bubble a { color: var(--igcb-accent); font-weight: 600; text-decoration: underline; }
.igcb-bubble-user a { color: #fff; }
.igcb-bubble strong { font-weight: 700; }

/* live chat: human agent bubbles */
.igcb-avatar-agent { background: var(--igcb-agent); color: #fff; }
.igcb-bubble-agent {
	background: #eafaf3;
	border: 1px solid #bfe9d6;
	border-bottom-left-radius: 5px;
	color: #0c3b2a;
	box-shadow: 0 1px 2px rgba(13,34,56,.05);
}
.igcb-bubble-agent a { color: var(--igcb-agent); }

/* live chat: system / status notes */
.igcb-system {
	text-align: center;
	font-size: 12px;
	color: var(--igcb-muted);
	margin: 4px auto 14px;
	padding: 0 12px;
	max-width: 90%;
	line-height: 1.45;
}

/* live chat: status banner between header and messages */
.igcb-livebar {
	flex: 0 0 auto;
	font-size: 12.5px;
	font-weight: 600;
	text-align: center;
	padding: 7px 14px;
	letter-spacing: .01em;
	border-bottom: 1px solid var(--igcb-border);
}
.igcb-livebar-live { background: #eafaf3; color: #0c6b4b; border-bottom-color: #cdeede; }
.igcb-livebar-waiting { background: #fff6e6; color: #9a6a07; border-bottom-color: #f3e2bd; }
.igcb-livebar-closed { background: #f1f3f6; color: var(--igcb-muted); }

/* typing */
.igcb-typing { display: flex; gap: 4px; align-items: center; }
.igcb-typing span {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--igcb-muted);
	animation: igcb-bounce 1.3s infinite ease-in-out;
}
.igcb-typing span:nth-child(2) { animation-delay: .15s; }
.igcb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes igcb-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: .5; }
	30% { transform: translateY(-5px); opacity: 1; }
}

/* chips */
.igcb-chips {
	display: flex; flex-wrap: wrap; gap: 8px;
	margin: 4px 0 14px 36px;
	animation: igcb-in .3s ease;
}
.igcb-chip {
	background: #fff;
	border: 1px solid var(--igcb-primary);
	color: var(--igcb-primary);
	border-radius: 20px;
	padding: 7px 13px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, transform .1s ease;
	line-height: 1.3;
	text-align: left;
}
.igcb-chip:hover { background: var(--igcb-primary); color: #fff; }
.igcb-chip:active { transform: scale(.97); }

/* ------------------------------------------------------------------ footer */

.igcb-footer {
	flex: 0 0 auto;
	padding: 12px 14px 10px;
	background: #fff;
	border-top: 1px solid #eaeef2;
}
.igcb-quote-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	padding: 11px 14px;
	margin-bottom: 10px;
	border: none;
	border-radius: 12px;
	background: var(--igcb-accent);
	color: #1f2a37;
	font-family: inherit;
	font-weight: 700;
	font-size: 14.5px;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 4px 12px -4px rgba(240,168,24,.6);
	transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.igcb-quote-btn:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 6px 16px -4px rgba(240,168,24,.7); }
.igcb-quote-btn:active { transform: translateY(0); }
.igcb-quote-btn svg { flex: 0 0 auto; }
.igcb-quote-arrow { transition: transform .2s ease; }
.igcb-quote-btn:hover .igcb-quote-arrow { transform: translateX(3px); }

.igcb-composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	background: var(--igcb-surface);
	border: 1px solid #e2e7ec;
	border-radius: 14px;
	padding: 6px 6px 6px 12px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.igcb-composer:focus-within {
	border-color: var(--igcb-primary);
	box-shadow: 0 0 0 3px rgba(14,58,95,.1);
}
.igcb-input {
	flex: 1 1 auto;
	border: none;
	background: transparent;
	resize: none;
	font-family: inherit;
	font-size: 14.5px;
	line-height: 1.45;
	color: var(--igcb-text);
	max-height: 120px;
	padding: 6px 0;
	outline: none;
}
.igcb-input::placeholder { color: var(--igcb-muted); }
.igcb-send {
	flex: 0 0 auto;
	width: 38px; height: 38px;
	border: none; border-radius: 10px;
	background: var(--igcb-primary);
	color: #fff;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: transform .12s ease, opacity .15s ease, background .15s ease;
}
.igcb-send:hover { transform: scale(1.06); }
.igcb-send:active { transform: scale(.95); }
.igcb-send:disabled { opacity: .5; cursor: default; transform: none; }

.igcb-disclaimer {
	font-size: 11px;
	color: var(--igcb-muted);
	text-align: center;
	margin-top: 9px;
	line-height: 1.4;
}
.igcb-credit {
	font-size: 10.5px;
	color: #aab3bd;
	text-align: center;
	margin-top: 4px;
	letter-spacing: .02em;
}
.igcb-credit a { color: #8c96a1; text-decoration: none; }
.igcb-credit a:hover { color: var(--igcb-primary); text-decoration: underline; }

/* -------------------------------------------------------------- quote form */

.igcb-quote-card {
	background: #fff;
	border: 1px solid var(--igcb-border);
	border-radius: 16px;
	box-shadow: 0 6px 20px -10px rgba(13,34,56,.28);
	padding: 14px 14px 12px;
	margin: 2px 0 14px;
	animation: igcb-in .28s cubic-bezier(.16,1,.3,1);
}
.igcb-q-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}
.igcb-q-title { font-weight: 700; font-size: 15px; color: var(--igcb-primary); }
.igcb-q-close {
	background: transparent; border: none; cursor: pointer;
	width: 28px; height: 28px; border-radius: 7px;
	display: flex; align-items: center; justify-content: center;
	color: var(--igcb-muted);
	transition: background .15s ease, color .15s ease;
}
.igcb-q-close:hover { background: var(--igcb-surface); color: var(--igcb-text); }
.igcb-q-intro { margin: 0 0 10px; font-size: 12.5px; color: var(--igcb-muted); line-height: 1.45; }

.igcb-q-body { display: flex; flex-direction: column; gap: 9px; }
.igcb-q-field-wrap { display: flex; flex-direction: column; gap: 3px; }
.igcb-q-label { font-size: 12px; font-weight: 600; color: var(--igcb-text); }
.igcb-q-field {
	width: 100%;
	font-family: inherit;
	font-size: 14px;
	color: var(--igcb-text);
	background: var(--igcb-surface);
	border: 1px solid #e2e7ec;
	border-radius: 10px;
	padding: 9px 11px;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.igcb-q-field { resize: vertical; min-height: 64px; line-height: 1.45; }
.igcb-q-field:focus {
	border-color: var(--igcb-primary);
	box-shadow: 0 0 0 3px rgba(14,58,95,.1);
	background: #fff;
}
.igcb-q-field.igcb-q-invalid { border-color: #d6453c; box-shadow: 0 0 0 3px rgba(214,69,60,.12); }
.igcb-q-field::placeholder { color: var(--igcb-muted); }
select.igcb-q-field {
	appearance: none; -webkit-appearance: none; cursor: pointer;
	padding-right: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7785' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

.igcb-q-error { font-size: 11.5px; color: #d6453c; min-height: 0; line-height: 1.3; }
.igcb-q-error:empty { display: none; }

.igcb-q-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12.5px;
	color: var(--igcb-text);
	line-height: 1.4;
	margin-top: 2px;
	cursor: pointer;
}
.igcb-q-consent-box { margin-top: 2px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--igcb-primary); }

.igcb-q-actions { display: flex; gap: 8px; margin-top: 12px; }
.igcb-q-cancel {
	flex: 0 0 auto;
	padding: 10px 14px;
	border: 1px solid #d8dee4;
	background: #fff;
	color: var(--igcb-muted);
	border-radius: 10px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.igcb-q-cancel:hover { background: var(--igcb-surface); color: var(--igcb-text); }
.igcb-q-submit {
	flex: 1 1 auto;
	padding: 10px 14px;
	border: none;
	background: var(--igcb-primary);
	color: #fff;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease, opacity .15s ease;
}
.igcb-q-submit:hover { filter: brightness(1.08); }
.igcb-q-submit:active { transform: scale(.99); }
.igcb-q-submit:disabled { opacity: .6; cursor: default; }

.igcb-q-status { font-size: 12.5px; margin-top: 9px; line-height: 1.4; }
.igcb-q-status:empty { display: none; }
.igcb-q-status-err { color: #d6453c; }

/* multi-step quote form extras */
.igcb-q-stepper { font-size: 11.5px; font-weight: 600; color: var(--igcb-muted); margin-top: 2px; }
.igcb-q-req { color: #d6453c; font-weight: 700; }
.igcb-q-hint { font-size: 11px; color: var(--igcb-muted); margin-top: 3px; }

.igcb-q-row2 { display: flex; gap: 8px; }
.igcb-q-row2 > .igcb-q-field-wrap { flex: 1 1 0; min-width: 0; }
.igcb-q-addr { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }

input.igcb-q-file {
	width: 100%;
	font-family: inherit;
	font-size: 12.5px;
	color: var(--igcb-text);
	background: var(--igcb-surface);
	border: 1px dashed #c8d0d8;
	border-radius: 10px;
	padding: 9px 10px;
	cursor: pointer;
}
input.igcb-q-file::-webkit-file-upload-button,
input.igcb-q-file::file-selector-button {
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--igcb-primary);
	background: #fff;
	border: 1px solid #d8dee4;
	border-radius: 8px;
	padding: 5px 10px;
	margin-right: 10px;
	cursor: pointer;
}

.igcb-q-back {
	flex: 0 0 auto;
	padding: 10px 16px;
	border: 1px solid #d8dee4;
	background: #fff;
	color: var(--igcb-muted);
	border-radius: 10px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.igcb-q-back:hover { background: var(--igcb-surface); color: var(--igcb-text); }
.igcb-q-next {
	flex: 1 1 auto;
	padding: 10px 14px;
	border: none;
	background: var(--igcb-primary);
	color: #fff;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
}
.igcb-q-next:hover { filter: brightness(1.08); }
.igcb-q-next:active { transform: scale(.99); }

/* guided-intake controls */
.igcb-chip-primary {
	background: var(--igcb-accent);
	border-color: var(--igcb-accent);
	color: #1f2a37;
}
.igcb-chip-primary:hover {
	background: var(--igcb-accent);
	color: #1f2a37;
	filter: brightness(1.05);
}
.igcb-intake-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 4px 0 14px 36px;
}
.igcb-intake-file input[type="file"] { max-width: 240px; }

.igcb-intakebar {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}
.igcb-ibtn {
	flex: 1 1 auto;
	padding: 9px 10px;
	border: 1px solid #d8dee4;
	background: #fff;
	color: var(--igcb-text);
	border-radius: 10px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.igcb-ibtn:hover { background: var(--igcb-surface); }
.igcb-ibtn-danger { color: #b32d2e; }
.igcb-ibtn-danger:hover { background: #fdecec; }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 480px) {
	.igcb-root { bottom: 16px; }
	.igcb-root.igcb-pos-right { right: 16px; }
	.igcb-root.igcb-pos-left { left: 16px; }
	.igcb-panel {
		position: fixed;
		bottom: 0; left: 0; right: 0;
		width: 100vw;
		max-width: 100vw;
		height: 100dvh;
		max-height: 100dvh;
		border-radius: 0;
	}
	.igcb-is-open .igcb-launcher { opacity: 0; pointer-events: none; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
	.igcb-root *,
	.igcb-root *::before,
	.igcb-root *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}
