/* Fresh Fibre — chat assistant (v1.5) */
#ffc-chat {
	--fc-teal: #0e7c6b; --fc-teal-d: #0a5c50; --fc-navy: #0b2233; --fc-gold: #f2b33d; --fc-gold-d: #d99a1f;
	--fc-ink: #0b2233; --fc-text: #294254; --fc-muted: #5b7080; --fc-line: #dbe5ea; --fc-soft: #f3f7f8; --fc-mint: #e7f5f2;
	position: fixed; right: 22px; bottom: 22px; z-index: 60;
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 15px; line-height: 1.5; color: var(--fc-text);
}
#ffc-chat *, #ffc-chat *::before, #ffc-chat *::after { box-sizing: border-box; }
#ffc-chat svg { width: 18px; height: 18px; flex: none; display: inline-block; }
#ffc-chat button { font-family: inherit; }
#ffc-chat [hidden] { display: none !important; }

/* Launcher */
.fc-launch {
	position: relative; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 22px 0 18px; margin-left: auto;
	border: 0; border-radius: 999px; cursor: pointer; background: var(--fc-teal); color: #fff;
	font: 700 15px/1 inherit; box-shadow: 0 12px 30px rgba(14,124,107,.42), 0 2px 6px rgba(11,34,51,.12);
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.fc-launch:hover { transform: translateY(-2px); background: var(--fc-teal-d); box-shadow: 0 16px 36px rgba(14,124,107,.5); }
.fc-launch svg { width: 24px; height: 24px; }
.fc-launch-dot { position: absolute; top: 2px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--fc-gold); border: 2.5px solid #fff; }
#ffc-chat.is-open .fc-launch { padding: 0; width: 58px; justify-content: center; }
#ffc-chat.is-open .fc-launch-label { display: none; }
#ffc-chat.is-open .fc-launch svg { display: none; }
#ffc-chat.is-open .fc-launch::before { content: ""; width: 18px; height: 18px; background: currentColor; clip-path: polygon(10% 0,50% 40%,90% 0,100% 10%,60% 50%,100% 90%,90% 100%,50% 60%,10% 100%,0 90%,40% 50%,0 10%); }

/* Teaser */
.fc-teaser { position: absolute; right: 0; bottom: 72px; display: flex; align-items: flex-start; animation: fcIn .3s ease; }
.fc-teaser-body {
	background: #fff; color: var(--fc-ink); border: 1px solid var(--fc-line); border-radius: 16px 16px 4px 16px;
	padding: 12px 16px; max-width: 250px; font: 600 14px/1.4 inherit; text-align: left; cursor: pointer;
	box-shadow: 0 14px 34px rgba(11,34,51,.16);
}
.fc-teaser-x { order: -1; margin: -8px -8px 0 0; position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--fc-navy); color: #fff; display: grid; place-items: center; cursor: pointer; }
.fc-teaser-x svg { width: 12px !important; height: 12px !important; }

/* Panel */
.fc-panel {
	position: absolute; right: 0; bottom: 74px; width: 400px; height: min(640px, calc(100vh - 110px));
	display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden;
	box-shadow: 0 30px 70px rgba(11,34,51,.3), 0 0 0 1px rgba(11,34,51,.06);
	animation: fcIn .22s ease; transform-origin: bottom right;
}
@keyframes fcIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.fc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(120deg, var(--fc-navy) 0%, #0d3a45 70%, #0e5a55 100%); color: #fff; }
.fc-av { position: relative; width: 42px; height: 42px; flex: none; }
.fc-av svg { width: 42px !important; height: 42px !important; border-radius: 13px; }
.fc-av i { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #3ddc97; border: 2px solid var(--fc-navy); }
.fc-title { min-width: 0; flex: 1; }
.fc-title strong { display: block; font-size: 15px; line-height: 1.25; color: #fff; }
.fc-title small { display: block; font-size: 12px; color: #a9c6cf; }
.fc-head-actions { display: flex; gap: 5px; }
.fc-hbtn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; text-decoration: none; transition: background .15s; }
.fc-hbtn:hover { background: rgba(255,255,255,.22); color: #fff; }
.fc-hbtn svg { width: 16px !important; height: 16px !important; }

/* Log */
.fc-log { flex: 1; overflow-y: auto; padding: 18px 14px 10px; background: var(--fc-soft); display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.fc-row { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; animation: fcMsg .2s ease; }
@keyframes fcMsg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fc-row--user { justify-content: flex-end; }
.fc-mini { width: 26px; height: 26px; flex: none; }
.fc-mini svg { width: 26px !important; height: 26px !important; border-radius: 8px; }
.fc-msg { max-width: calc(100% - 40px); padding: 11px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.55; word-wrap: break-word; }
.fc-row--bot .fc-msg { background: #fff; border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(11,34,51,.07); color: var(--fc-text); }
.fc-row--user .fc-msg { background: var(--fc-teal); color: #fff; border-bottom-right-radius: 6px; max-width: 82%; }
.fc-msg p { margin: 0 0 8px; }
.fc-msg p:last-child { margin-bottom: 0; }
.fc-msg strong { color: var(--fc-ink); }
.fc-row--user .fc-msg strong { color: #fff; }
.fc-msg a { color: var(--fc-teal); font-weight: 700; }
.fc-msg em { font-style: normal; background: var(--fc-mint); border-radius: 5px; padding: 0 5px; color: var(--fc-teal-d); font-weight: 600; }
.fc-note { font-size: 12.5px; color: var(--fc-muted); }
.fc-center { text-align: center; }
.fc-label { font-size: 11.5px !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fc-muted); margin: 12px 0 6px !important; }
.fc-typing { padding: 14px 16px !important; }
.fc-dots { display: flex; gap: 4px; }
.fc-dots i { width: 7px; height: 7px; border-radius: 50%; background: #9fb3bd; animation: fcDot 1s infinite ease-in-out; }
.fc-dots i:nth-child(2) { animation-delay: .15s; } .fc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes fcDot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

/* Welcome */
.fc-welcome { max-width: calc(100% - 34px) !important; }
.fc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.fc-tile {
	display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
	padding: 12px; border-radius: 14px; border: 1.5px solid var(--fc-line); background: #fff; cursor: pointer; color: var(--fc-ink);
	transition: border-color .15s, background .15s, transform .15s;
}
.fc-tile:hover { border-color: var(--fc-teal); background: var(--fc-mint); transform: translateY(-1px); }
.fc-tile > svg { width: 30px !important; height: 30px !important; padding: 6px; border-radius: 9px; background: var(--fc-mint); color: var(--fc-teal); }
.fc-tile strong { display: block; font-size: 13.5px; line-height: 1.25; }
.fc-tile small { display: block; font-size: 12px; color: var(--fc-muted); line-height: 1.3; margin-top: 2px; }
.fc-tile--wide { grid-column: 1 / -1; flex-direction: row; align-items: center; background: var(--fc-navy); border-color: var(--fc-navy); }
.fc-tile--wide strong { color: #fff; } .fc-tile--wide small { color: #a9c6cf; }
.fc-tile--wide > svg { background: rgba(242,179,61,.2); color: var(--fc-gold); }
.fc-tile--wide:hover { background: #12334a; border-color: #12334a; }
.fc-qs { display: grid; gap: 6px; }
.fc-q { display: flex; align-items: flex-start; gap: 8px; text-align: left; padding: 9px 11px; border-radius: 11px; border: 1px solid var(--fc-line); background: #fff; color: var(--fc-ink); font: 600 13px/1.35 inherit; cursor: pointer; }
.fc-q:hover { border-color: var(--fc-teal); color: var(--fc-teal); }
.fc-q svg { width: 16px !important; height: 16px !important; color: var(--fc-teal); margin-top: 1px; }

/* Buttons inside messages */
.fc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fc-btn {
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px;
	border: 1.5px solid var(--fc-teal); background: #fff; color: var(--fc-teal) !important; font: 700 13px/1.2 inherit;
	text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.fc-btn svg { width: 15px !important; height: 15px !important; }
.fc-btn:hover { background: var(--fc-teal); color: #fff !important; }
.fc-btn--primary { background: var(--fc-gold); border-color: var(--fc-gold); color: var(--fc-navy) !important; }
.fc-btn--primary:hover { background: var(--fc-gold-d); border-color: var(--fc-gold-d); color: var(--fc-navy) !important; }
.fc-btn--block { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }
.fc-btn:disabled { opacity: .6; cursor: default; }

/* Tables, cards, estimate */
.fc-table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13.5px; }
.fc-table td { padding: 6px 0; border-bottom: 1px dashed var(--fc-line); vertical-align: top; }
.fc-table tr:last-child td { border-bottom: 0; }
.fc-table td:last-child { text-align: right; font-weight: 800; color: var(--fc-teal-d); padding-left: 10px; white-space: nowrap; }
.fc-card { border-left: 3px solid var(--fc-teal); padding: 2px 0 2px 11px; margin-bottom: 8px; }
.fc-card p { margin: 4px 0 0 !important; }
.fc-price { font-weight: 800; color: var(--fc-teal-d); }
.fc-est { background: var(--fc-navy); color: #cfe0e6; border-radius: 14px; padding: 12px 14px; margin: 6px 0 8px; }
.fc-est span { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8fb0bd; }
.fc-est strong { display: block; color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 2px 0; }
.fc-est small { font-size: 12.5px; }
.fc-ok { display: flex; gap: 8px; align-items: flex-start; }
.fc-ok svg { color: #00a060; margin-top: 2px; }
.fc-list { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.fc-list li { margin-bottom: 5px; }
.fc-list--plain { list-style: none; padding-left: 0; }
.fc-links { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-links .fc-btn { border-color: var(--fc-line); color: var(--fc-ink) !important; font-weight: 600; padding: 6px 11px; }
.fc-links .fc-btn:hover { border-color: var(--fc-teal); background: var(--fc-mint); color: var(--fc-teal) !important; }

/* Services list */
.fc-svcs { display: grid; gap: 6px; margin-top: 4px; }
.fc-svc { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--fc-line); background: #fff; cursor: pointer; text-align: left; color: var(--fc-ink); font: 700 13.5px/1.3 inherit; }
.fc-svc span { flex: 1; }
.fc-svc small { font-size: 11.5px; font-weight: 700; color: var(--fc-teal-d); background: var(--fc-mint); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.fc-svc svg { width: 15px !important; height: 15px !important; color: var(--fc-muted); }
.fc-svc:hover { border-color: var(--fc-teal); }
.fc-svc:hover svg { color: var(--fc-teal); }

/* Calculator */
.fc-calc > p:first-child { margin-bottom: 10px; }
.fc-crow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--fc-line); }
.fc-crow strong { display: block; font-size: 13.5px; }
.fc-crow small { display: block; font-size: 12px; color: var(--fc-muted); }
.fc-step { display: inline-flex; align-items: center; gap: 4px; background: var(--fc-soft); border-radius: 999px; padding: 3px; }
.fc-step button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #fff; color: var(--fc-teal); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 2px rgba(11,34,51,.12); }
.fc-step button:hover { background: var(--fc-teal); color: #fff; }
.fc-step svg { width: 14px !important; height: 14px !important; }
.fc-step output { min-width: 22px; text-align: center; font-weight: 800; color: var(--fc-ink); }
.fc-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 4px; }
.fc-total span { font-weight: 700; color: var(--fc-muted); font-size: 13px; }
.fc-total strong { font-size: 24px; font-weight: 800; color: var(--fc-teal-d); letter-spacing: -.02em; }

/* Contact block */
.fc-contact { display: grid; gap: 6px; margin: 6px 0; }
.fc-contact a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--fc-soft); color: var(--fc-ink) !important; text-decoration: none; font-weight: 700; font-size: 14px; word-break: break-word; }
.fc-contact a:hover { background: var(--fc-mint); }
.fc-contact a > svg { width: 32px !important; height: 32px !important; padding: 7px; border-radius: 50%; background: var(--fc-teal); color: #fff; }
.fc-contact small { display: block; font-size: 11.5px; color: var(--fc-muted); font-weight: 600; }

/* Quote form */
.fc-form label { display: block; font-size: 12px; font-weight: 700; color: var(--fc-ink); margin-bottom: 8px; }
.fc-form label em { font-weight: 500; color: var(--fc-muted); background: none; padding: 0; }
.fc-form input, .fc-form select, .fc-form textarea {
	display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border-radius: 10px; border: 1.5px solid var(--fc-line);
	background: #fbfdfd; font: 500 14px/1.3 inherit; color: var(--fc-ink);
}
.fc-form textarea { resize: vertical; min-height: 56px; }
.fc-form input:focus, .fc-form select:focus, .fc-form textarea:focus { outline: none; border-color: var(--fc-teal); box-shadow: 0 0 0 3px rgba(14,124,107,.14); background: #fff; }
.fc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
.fc-err { background: #fdecec; color: #9b1c1c; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.fc-err a { color: #9b1c1c; }
.fc-form .fc-btn--block { margin-top: 4px; }
.fc-done { display: flex; gap: 10px; align-items: flex-start; }
.fc-done > svg { width: 28px !important; height: 28px !important; color: #00a060; }
.fc-done strong { display: block; }
.fc-done p { margin: 2px 0 0 !important; font-size: 13.5px; }

/* Suggestions + input */
.fc-sugg { display: flex; gap: 6px; padding: 8px 12px 2px; background: var(--fc-soft); overflow-x: auto; scrollbar-width: none; flex: none; }
.fc-sugg::-webkit-scrollbar { display: none; }
.fc-chip {
	flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
	border: 1.5px solid var(--fc-line); background: #fff; color: var(--fc-ink) !important; font: 700 12.5px/1.2 inherit;
	cursor: pointer; text-decoration: none; white-space: nowrap;
}
.fc-chip svg { width: 14px !important; height: 14px !important; color: var(--fc-teal); }
.fc-chip:hover { border-color: var(--fc-teal); color: var(--fc-teal) !important; }
.fc-chip--primary { background: var(--fc-gold); border-color: var(--fc-gold); color: var(--fc-navy) !important; }
.fc-chip--primary svg { color: var(--fc-navy); }
.fc-chip--primary:hover { background: var(--fc-gold-d); border-color: var(--fc-gold-d); color: var(--fc-navy) !important; }
.fc-input { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--fc-soft); flex: none; }
.fc-input input {
	flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--fc-line); background: #fff;
	font: 500 14.5px inherit; color: var(--fc-ink);
}
.fc-input input:focus { outline: none; border-color: var(--fc-teal); box-shadow: 0 0 0 3px rgba(14,124,107,.14); }
.fc-input button { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--fc-teal); color: #fff; display: grid; place-items: center; cursor: pointer; }
.fc-input button:hover { background: var(--fc-teal-d); }

/* Mobile */
@media (max-width: 760px) {
	#ffc-chat { right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); }
	.fc-launch { width: 56px; height: 56px; padding: 0; justify-content: center; }
	.fc-launch-label { display: none; }
	.fc-teaser { bottom: 68px; }
}
@media (max-width: 640px) {
	#ffc-chat.is-open { inset: 0; z-index: 100; }
	#ffc-chat.is-open .fc-launch, #ffc-chat.is-open .fc-teaser { display: none; }
	#ffc-chat.is-open .fc-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; animation: none; }
	.fc-head { padding-top: calc(12px + env(safe-area-inset-top)); }
	.fc-input { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
	.fc-input input { font-size: 16px; } /* stops iOS zoom */
	.fc-form input, .fc-form select, .fc-form textarea { font-size: 16px; }
	html.fc-lock, html.fc-lock body { overflow: hidden; }
}
@media (max-width: 360px) { .fc-grid, .fc-tiles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { #ffc-chat * { animation: none !important; transition: none !important; } }
@media print { #ffc-chat { display: none !important; } }
