/* Display Stop Display Finder. Every rule is scoped to .dsf-* */
:root { --dsf-primary: #316295; --dsf-accent: #C76464; }

/* ---------- top banner ---------- */
.dsf-banner {
	box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 14px;
	min-height: 44px; padding: 7px 44px 7px 14px; position: relative;
	background: var(--dsf-primary); color: #fff;
	font: 500 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-align: center;
}
.dsf-banner-btn {
	flex: none; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer;
	background: #fff; color: var(--dsf-primary); font: 700 14px/1.2 inherit; font-family: inherit; white-space: nowrap;
}
.dsf-banner-btn:hover, .dsf-banner-btn:focus-visible { background: #f1f5fa; }
.dsf-banner-x {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	width: 32px; height: 32px; border: 0; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; opacity: .85;
}
.dsf-banner-x:hover { opacity: 1; }
@media (max-width: 640px) {
	.dsf-banner { font-size: 13px; gap: 10px; justify-content: flex-start; text-align: left; padding-left: 12px; }
	.dsf-banner-btn { padding: 6px 12px; font-size: 13px; }
}

/* ---------- buttons placed in pages ---------- */
.dsf-product-ask { margin: 12px 0; }
.dsf-ask-btn {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
	border: 2px solid var(--dsf-primary); border-radius: 6px; padding: 10px 16px;
	background: #fff; color: var(--dsf-primary); font: 600 15px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.dsf-ask-btn:hover, .dsf-ask-btn:focus-visible { background: var(--dsf-primary); color: #fff; }

/* ---------- launcher ---------- */
.dsf-launcher {
	position: fixed; bottom: 18px; z-index: 99990; display: inline-flex; align-items: center; gap: 8px;
	border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer;
	background: var(--dsf-primary); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25);
	font: 700 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.dsf-launcher.dsf-left { left: 18px; } .dsf-launcher.dsf-right { right: 18px; }
.dsf-launcher:hover, .dsf-launcher:focus-visible { filter: brightness(1.08); }
.dsf-launcher[hidden] { display: none; }

/* ---------- panel ---------- */
.dsf-panel {
	position: fixed; bottom: 18px; z-index: 99995; box-sizing: border-box;
	width: 410px; max-width: calc(100vw - 24px); height: min(680px, calc(100vh - 36px));
	display: flex; flex-direction: column; overflow: hidden;
	background: #fff; color: #1d2733; border-radius: 14px; box-shadow: 0 14px 48px rgba(0,0,0,.3);
	font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-align: left;
}
.dsf-panel[hidden] { display: none; }
.dsf-panel.dsf-wide { width: clamp(500px, 36vw, 620px); max-width: calc(100vw - 36px); height: min(820px, calc(100vh - 110px)); }
.dsf-panel.dsf-left { left: 18px; } .dsf-panel.dsf-right { right: 18px; }
.dsf-panel *, .dsf-panel *::before, .dsf-panel *::after { box-sizing: border-box; }
.dsf-panel button, .dsf-panel input, .dsf-panel textarea { font-family: inherit; }

.dsf-head { flex: none; display: flex; align-items: center; gap: 6px; padding: 12px 10px 12px 16px; background: var(--dsf-header, var(--dsf-primary)); color: #fff; }
.dsf-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dsf-title strong { font-size: 16px; font-weight: 700; }
.dsf-title span { font-size: 12px; opacity: .85; }
.dsf-head-btn { border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 13px; padding: 6px 8px; border-radius: 6px; opacity: .9; }
.dsf-head-btn:hover, .dsf-head-btn:focus-visible { background: rgba(255,255,255,.16); opacity: 1; }
.dsf-x { font-size: 24px; line-height: 1; padding: 2px 9px; }

.dsf-log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; background: #f5f7fa; overscroll-behavior: contain; }
.dsf-msg { display: flex; margin: 0 0 10px; }
.dsf-user { justify-content: flex-end; }
.dsf-bubble { max-width: 90%; padding: 10px 13px; border-radius: 14px; overflow-wrap: anywhere; }
.dsf-bot .dsf-bubble { background: #fff; border: 1px solid #e1e6ec; border-bottom-left-radius: 4px; }
.dsf-user .dsf-bubble { background: var(--dsf-primary); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.dsf-text p { margin: 0 0 8px; } .dsf-text p:last-child { margin-bottom: 0; }
.dsf-text ul, .dsf-text ol { margin: 0 0 8px; padding-left: 20px; } .dsf-text li { margin: 2px 0; }
.dsf-text a { color: var(--dsf-primary); text-decoration: underline; }
.dsf-bubble > .dsf-text + .dsf-card, .dsf-bubble > .dsf-card + .dsf-text, .dsf-bubble > .dsf-card + .dsf-card { margin-top: 10px; }

.dsf-card { display: flex; gap: 10px; padding: 8px; border: 1px solid #e1e6ec; border-radius: 10px; background: #fbfcfd; }
.dsf-card-img { flex: none; width: 84px; height: 84px; border-radius: 6px; background: #e9edf2; overflow: hidden; display: block; }
.dsf-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.dsf-card-body { flex: 1; min-width: 0; }
.dsf-card-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #6a7684; }
.dsf-card-name { display: block; font-weight: 700; font-size: 14px; line-height: 1.3; color: #1d2733; text-decoration: none; }
.dsf-card-name:hover { color: var(--dsf-primary); }
.dsf-card-price { font-size: 13px; color: #4a5766; margin-top: 2px; }
.dsf-card-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }

.dsf-btn { display: inline-block; border-radius: 6px; padding: 6px 11px; font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; text-decoration: none; border: 1.5px solid transparent; }
.dsf-btn-line { border-color: var(--dsf-primary); color: var(--dsf-primary); background: #fff; }
.dsf-btn-line:hover { background: var(--dsf-primary); color: #fff; }
.dsf-btn-accent { background: var(--dsf-accent); color: #fff; }
.dsf-btn-accent:hover, .dsf-btn-accent:focus-visible { filter: brightness(.93); }
.dsf-btn[disabled] { opacity: .6; cursor: default; }

.dsf-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 12px; }
.dsf-chip { border: 1.5px solid var(--dsf-primary); background: #fff; color: var(--dsf-primary); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; text-align: left; }
.dsf-chip:hover, .dsf-chip:focus-visible { background: var(--dsf-primary); color: #fff; }

.dsf-note { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; background: #e8f3ea; border: 1px solid #bcdcc2; color: #1f4d2a; font-size: 14px; }
.dsf-note-err { background: #fdecec; border-color: #f0c2c2; color: #7a1f1f; }

.dsf-typing .dsf-bubble { display: inline-flex; gap: 4px; padding: 14px; }
.dsf-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa6b4; animation: dsf-b 1.1s infinite ease-in-out; }
.dsf-typing span:nth-child(2) { animation-delay: .15s; } .dsf-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dsf-b { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .dsf-typing span { animation: none; } }

/* ---------- lead form ---------- */
.dsf-form { margin: 4px 0 12px; padding: 14px; background: #fff; border: 1px solid #d5dce4; border-radius: 12px; }
.dsf-form-title { font-weight: 700; font-size: 16px; }
.dsf-form-sub { font-size: 13px; color: #55616f; margin: 2px 0 10px; }
.dsf-form-sub a { color: var(--dsf-accent); font-weight: 700; white-space: nowrap; }
.dsf-field { display: block; margin: 0 0 8px; }
.dsf-field span { display: block; font-size: 12px; font-weight: 600; color: #3b4755; margin-bottom: 3px; }
.dsf-panel .dsf-field input, .dsf-panel .dsf-field textarea {
	width: 100%; margin: 0; padding: 8px 10px; border: 1px solid #c3ccd6; border-radius: 6px; background: #fff; color: #1d2733;
	font-size: 16px; line-height: 1.3; box-shadow: none; height: auto; min-height: 0;
}
.dsf-panel .dsf-field textarea { min-height: 62px; resize: vertical; }
.dsf-panel .dsf-field input:focus, .dsf-panel .dsf-field textarea:focus, .dsf-panel .dsf-input:focus { outline: 2px solid var(--dsf-primary); outline-offset: 0; border-color: var(--dsf-primary); }
.dsf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dsf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.dsf-form-err { color: #a12222; font-size: 13px; min-height: 0; margin-bottom: 6px; }
.dsf-form-go { width: 100%; padding: 11px; font-size: 15px; }
.dsf-form-fine { font-size: 12px; color: #6a7684; text-align: center; margin-top: 7px; }

/* ---------- composer ---------- */
.dsf-foot { flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 6px; margin: 0; background: #fff; border-top: 1px solid #e1e6ec; }
.dsf-panel .dsf-input {
	flex: 1; margin: 0; resize: none; border: 1px solid #c3ccd6; border-radius: 10px; padding: 9px 11px; background: #fff; color: #1d2733;
	font-size: 16px; line-height: 1.35; max-height: 120px; min-height: 0; height: auto; box-shadow: none;
}
.dsf-send { flex: none; border: 0; border-radius: 10px; padding: 0 16px; height: 42px; background: var(--dsf-primary); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.dsf-send[disabled] { opacity: .55; cursor: default; }
.dsf-fine { flex: none; display: block; padding: 0 12px 10px; background: #fff; font-size: 11px; line-height: 1.4; color: #7a8592; }
.dsf-fine-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 4px; }
.dsf-fine-text { display: block; }
.dsf-link { flex: none; border: 0; background: none; padding: 0; color: var(--dsf-accent); font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ---------- phones: full screen ---------- */
@media (max-width: 640px) {
	.dsf-panel, .dsf-panel.dsf-left, .dsf-panel.dsf-right { left: 0; right: 0; bottom: 0; top: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border-radius: 0; }
	html.dsf-is-open, html.dsf-is-open body { overflow: hidden; }
	.dsf-launcher { bottom: 14px; padding: 11px 15px; font-size: 14px; }
	.dsf-launcher.dsf-left { left: 12px; } .dsf-launcher.dsf-right { right: 12px; }
}


/* ---------- theme guard ----------
   Themes such as Woodmart style every <button> and <input> (grey fill, ALL CAPS, square corners, fixed heights).
   These rules start with "html body" so they win over the theme, and restate how each widget control should look. */
html body .dsf-banner, html body .dsf-panel, html body .dsf-launcher { text-transform: none; letter-spacing: normal; }
html body .dsf-banner button, html body .dsf-panel button, html body .dsf-panel input, html body .dsf-panel textarea, html body button.dsf-launcher, html body .dsf-product-ask button {
	text-transform: none !important; letter-spacing: normal !important; text-shadow: none !important; -webkit-appearance: none; appearance: none;
	min-height: 0 !important; min-width: 0 !important; margin: 0; font-family: inherit !important; font-style: normal; text-decoration: none;
	box-shadow: none !important; transition: none; float: none; width: auto;
}
html body .dsf-banner { line-height: 1.35; }
html body .dsf-banner .dsf-banner-text { text-transform: none; letter-spacing: normal; font-weight: 500; }
html body .dsf-banner button.dsf-banner-btn {
	background: #fff; color: var(--dsf-primary); border: 0; border-radius: 999px; padding: 7px 16px; height: auto; line-height: 1.2; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
html body .dsf-banner button.dsf-banner-btn:hover, html body .dsf-banner button.dsf-banner-btn:focus-visible { background: #f1f5fa; color: var(--dsf-primary); }
html body .dsf-banner button.dsf-banner-x {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px;
	background: transparent; color: #fff; font-size: 22px; line-height: 1; font-weight: 400; opacity: .85; cursor: pointer;
}
html body .dsf-banner button.dsf-banner-x:hover { background: rgba(255,255,255,.16); color: #fff; opacity: 1; }

html body button.dsf-launcher {
	border: 0; border-radius: 999px; padding: 12px 18px; height: auto; background: var(--dsf-primary); color: #fff; line-height: 1; font-size: 15px; font-weight: 700;
	box-shadow: 0 6px 20px rgba(0,0,0,.25) !important; cursor: pointer;
}
html body button.dsf-launcher:hover, html body button.dsf-launcher:focus-visible { background: var(--dsf-primary); color: #fff; }

html body .dsf-panel button.dsf-head-btn {
	background: transparent; color: #fff; border: 0; border-radius: 6px; padding: 6px 8px; height: auto; line-height: 1.2; font-size: 13px; font-weight: 400; opacity: .9; cursor: pointer;
}
html body .dsf-panel button.dsf-head-btn:hover, html body .dsf-panel button.dsf-head-btn:focus-visible { background: rgba(255,255,255,.16); color: #fff; opacity: 1; }
html body .dsf-panel button.dsf-x { font-size: 24px; line-height: 1; padding: 2px 9px; }

html body .dsf-panel button.dsf-chip {
	background: #fff; color: var(--dsf-primary); border: 1.5px solid var(--dsf-primary); border-radius: 999px; padding: 7px 13px; height: auto;
	font-size: 14px; font-weight: 600; line-height: 1.2; text-align: left; cursor: pointer; white-space: normal;
}
html body .dsf-panel button.dsf-chip:hover, html body .dsf-panel button.dsf-chip:focus-visible { background: var(--dsf-primary); color: #fff; border-color: var(--dsf-primary); }

html body .dsf-panel .dsf-btn { display: inline-block; border-radius: 6px; padding: 6px 11px; height: auto; font-size: 13px; font-weight: 700; line-height: 1.2; border: 1.5px solid transparent; text-transform: none; letter-spacing: normal; cursor: pointer; }
html body .dsf-panel .dsf-btn-line { background: #fff; color: var(--dsf-primary); border-color: var(--dsf-primary); }
html body .dsf-panel .dsf-btn-line:hover, html body .dsf-panel .dsf-btn-line:focus-visible { background: var(--dsf-primary); color: #fff; }
html body .dsf-panel .dsf-btn-accent { background: var(--dsf-accent); color: #fff; border-color: var(--dsf-accent); }
html body .dsf-panel .dsf-btn-accent:hover, html body .dsf-panel .dsf-btn-accent:focus-visible { background: var(--dsf-accent); color: #fff; filter: brightness(.93); }
html body .dsf-panel button.dsf-form-go { display: block; width: 100%; padding: 11px; font-size: 15px; }

html body .dsf-panel button.dsf-send {
	background: var(--dsf-primary); color: #fff; border: 0; border-radius: 10px; padding: 0 16px; height: 42px; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer;
}
html body .dsf-panel button.dsf-send:hover, html body .dsf-panel button.dsf-send:focus-visible { background: var(--dsf-primary); color: #fff; filter: brightness(1.08); }
html body .dsf-panel button.dsf-send[disabled] { opacity: .55; cursor: default; }

html body .dsf-panel button.dsf-link {
	background: none; color: var(--dsf-accent); border: 0; border-radius: 0; padding: 0; height: auto; font-size: 12px; font-weight: 700; line-height: 1.4; text-decoration: underline !important; cursor: pointer;
}
html body .dsf-panel button.dsf-link:hover, html body .dsf-panel button.dsf-link:focus-visible { background: none; color: var(--dsf-primary); }

html body .dsf-panel textarea.dsf-input {
	flex: 1; border: 1px solid #c3ccd6; border-radius: 10px; padding: 9px 11px; background: #fff; color: #1d2733; font-size: 16px; line-height: 1.35; font-weight: 400; max-height: 120px; height: auto; width: auto;
}
html body .dsf-panel .dsf-field input, html body .dsf-panel .dsf-field textarea {
	width: 100%; padding: 8px 10px; border: 1px solid #c3ccd6; border-radius: 6px; background: #fff; color: #1d2733; font-size: 16px; line-height: 1.3; font-weight: 400; height: auto;
}
html body .dsf-panel .dsf-field span, html body .dsf-panel .dsf-card-cat { letter-spacing: normal; }
html body .dsf-panel a { text-transform: none; letter-spacing: normal; }
html body .dsf-panel .dsf-card-cat { text-transform: uppercase; letter-spacing: .04em; }
html body .dsf-panel .dsf-text a { color: var(--dsf-primary); text-decoration: underline; }
html body .dsf-panel .dsf-btn { text-decoration: none; }
html body .dsf-product-ask button.dsf-ask-btn {
	display: inline-flex; border: 2px solid var(--dsf-primary); border-radius: 6px; padding: 10px 16px; height: auto; background: #fff; color: var(--dsf-primary); font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer;
}
html body .dsf-product-ask button.dsf-ask-btn:hover, html body .dsf-product-ask button.dsf-ask-btn:focus-visible { background: var(--dsf-primary); color: #fff; }

@media (max-width: 640px) {
	html body .dsf-banner { font-size: 13px; padding-right: 42px; }
	html body .dsf-banner button.dsf-banner-btn { padding: 6px 12px; font-size: 13px; }
}
/* Woodmart's phone toolbar is about 55px tall. */
@media (max-width: 1024px) {
	html.dsf-has-toolbar body button.dsf-launcher { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

/* Larger window toggle: hidden on phones, where the chat already fills the screen */
html body .dsf-panel.dsf-wide { width: clamp(500px, 36vw, 620px); max-width: calc(100vw - 36px); height: min(820px, calc(100vh - 110px)); }
@media (max-width: 760px) { html body .dsf-panel button.dsf-expand { display: none; } }
@media (max-width: 640px) { html body .dsf-panel.dsf-wide { width: 100%; max-width: none; height: 100%; height: 100dvh; } }

/* "Continue your chat": a small dot shows there is a conversation waiting */
html body button.dsf-launcher.dsf-has-chat { position: fixed; }
html body button.dsf-launcher.dsf-has-chat::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dsf-accent); border: 2px solid #fff; box-sizing: content-box; margin-left: -2px; }

/* Photo strip */
.dsf-photos { margin-top: 10px; }
.dsf-bubble > .dsf-text + .dsf-photos { margin-top: 10px; }
.dsf-photos-cap { font-size: 12px; color: #6a7684; margin-bottom: 5px; }
.dsf-photos-row { display: flex; flex-wrap: wrap; gap: 6px; }
html body .dsf-panel .dsf-photo { flex: none; width: 74px; height: 74px; padding: 0; border: 1px solid #e1e6ec; border-radius: 8px; background: #fff; overflow: hidden; cursor: pointer; display: block; }
html body .dsf-panel .dsf-photo:hover, html body .dsf-panel .dsf-photo:focus { border-color: var(--dsf-primary); outline: 2px solid var(--dsf-primary); outline-offset: 1px; }
.dsf-photo img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.dsf-bubble > .dsf-photos + .dsf-text, .dsf-bubble > .dsf-photos + .dsf-card { margin-top: 10px; }

/* Add to cart in the chat */
.dsf-cart { margin: 10px 0 2px; padding: 10px 12px; border: 1px solid #d6dde6; border-radius: 10px; background: #fff; }
.dsf-cart-bar { padding: 0; border: 0; background: none; }
.dsf-cart-name { font-weight: 700; font-size: 14px; line-height: 1.3; color: #1d2733; }
.dsf-cart-price { font-size: 13px; color: #55616f; margin: 2px 0 8px; }
.dsf-cart-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dsf-cart-qty { height: 36px; border: 1px solid #b9c3cf; border-radius: 8px; padding: 0 8px; background: #fff; font-size: 14px; }
.dsf-cart-msg { margin-top: 8px; font-size: 13px; line-height: 1.4; color: #3b4652; }
.dsf-cart-done { background: #f1f8f3; border-color: #bfdcc7; }
html body .dsf-panel .dsf-cart a.dsf-btn, html body .dsf-panel .dsf-cart button.dsf-btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 700; line-height: 1; text-decoration: none !important; cursor: pointer; box-sizing: border-box; }
html body .dsf-panel .dsf-cart button.dsf-btn:disabled { opacity: .6; cursor: default; }
.dsf-form-hint { font-size: 12px; color: #6a7684; margin: -2px 0 8px; line-height: 1.35; }

/* v1.0.64: product-question chip stands out; quote and call links are buttons; Start over hidden until a chat exists */
html body .dsf-panel button.dsf-chip.dsf-chip-q { background: var(--dsf-primary); color: #fff; border-color: var(--dsf-primary); }
html body .dsf-panel button.dsf-chip.dsf-chip-q:hover, html body .dsf-panel button.dsf-chip.dsf-chip-q:focus-visible { filter: brightness(1.12); }
html body .dsf-panel .dsf-fine-links { gap: 8px; margin: 2px 0 8px; }
html body .dsf-panel button.dsf-link {
	background: #fff; color: var(--dsf-primary); border: 1.5px solid var(--dsf-primary); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 700; line-height: 1.2; text-decoration: none !important;
}
html body .dsf-panel button.dsf-link:hover, html body .dsf-panel button.dsf-link:focus-visible { background: var(--dsf-primary); color: #fff; }
.dsf-head-btn[hidden] { display: none !important; }
