/* Instant online quote (publicweb/templates/quote_widget.html, static/js/quote.js) + the page buttons (quote_cta.html).
   Pico and Bootstrap style every button / input on the site: the resets below keep them out. */

/* ── the window ── */
.sfq { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; font-family: inherit; }
.sfq[hidden] { display: none; }
html.sfq-open, html.sfq-open body { overflow: hidden; }
html.sfq-open .sfc { display: none; }          /* the 24h chat launcher / bubbles would sit on top of the window */
.sfq__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.sfq__box { position: relative; width: 460px; max-width: calc(100vw - 24px); height: 720px; max-height: calc(100vh - 32px); background: #f8fafc; border-radius: 20px; box-shadow: 0 30px 80px rgba(15, 23, 42, .45); display: flex; flex-direction: column; overflow: hidden; animation: sfqIn .25s ease-out both; }
@keyframes sfqIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.sfq button, .sfq input, .sfq textarea { font-family: inherit; margin: 0; width: auto; box-sizing: border-box; }
.sfq__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, #0071e3, #2563eb 60%, #7c3aed); color: #fff; }
.sfq__avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; }
.sfq__title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.sfq__title b { font-size: 16px; }
.sfq__title span { font-size: 12.5px; opacity: .9; }
.sfq__title span.is-live::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #4ade80; }
.sfq .sfq__close { background: rgba(255, 255, 255, .15); border: none; color: #fff; width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 16px; cursor: pointer; flex: 0 0 34px; }
.sfq .sfq__close:hover { background: rgba(255, 255, 255, .28); }

/* ── the log ── */
.sfq__log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.sfq__msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; word-break: break-word; white-space: pre-wrap; }
.sfq__msg--assistant, .sfq__msg--staff { align-self: flex-start; background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; color: #0f172a; }
.sfq__msg--customer { align-self: flex-end; background: #0071e3; color: #fff; border-bottom-right-radius: 4px; }
.sfq__msg--system { align-self: center; max-width: 94%; background: #ecfdf5; color: #065f46; font-size: 13px; text-align: center; border-radius: 12px; }
.sfq__msg a { color: inherit; text-decoration: underline; }
.sfq__msg.is-sending { opacity: .6; }
.sfq__msg.is-failed { opacity: .45; }
.sfq__who { display: block; font-size: 11px; font-weight: 700; color: #16a34a; margin-bottom: 2px; }
.sfq__photos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.sfq__photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; display: block; background: #e2e8f0; }
.sfq__typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; }
.sfq__typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: sfqDot 1.2s infinite; }
.sfq__typing i:nth-child(2) { animation-delay: .2s; } .sfq__typing i:nth-child(3) { animation-delay: .4s; }
@keyframes sfqDot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* ── cards: photos, contact, order, technician ── */
.sfq__card { align-self: stretch; background: #fff; border: 1px solid #dbeafe; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #0f172a; box-shadow: 0 4px 14px rgba(0, 113, 227, .08); }
.sfq__card b { font-size: 14.5px; }
.sfq__card ol { margin: 0; padding-left: 20px; color: #334155; }
.sfq__card ol li { margin: 2px 0; }
.sfq__card p { margin: 0; font-size: 12.5px; color: #64748b; }
.sfq__card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sfq .sfq__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 12px; padding: 10px 14px; background: #0071e3; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.2; text-align: center; }
.sfq .sfq__btn:hover { background: #005bb8; }
.sfq .sfq__btn:disabled { opacity: .6; cursor: default; }
.sfq .sfq__btn--ghost { background: #eff6ff; color: #0071e3; }
.sfq .sfq__btn--ghost:hover { background: #dbeafe; }
.sfq .sfq__btn--link { background: none; color: #64748b; font-weight: 500; text-decoration: underline; padding: 10px 6px; }
.sfq .sfq__btn--link:hover { background: none; color: #0f172a; }
.sfq .sfq__btn--big { width: 100%; padding: 13px 16px; font-size: 15px; background: #16a34a; }
.sfq .sfq__btn--big:hover { background: #15803d; }
.sfq__card--order .sfq__btn--ghost { width: 100%; }
.sfq__card--handoff { flex-direction: row; flex-wrap: wrap; border-color: #e2e8f0; }
.sfq__qr { display: flex; gap: 14px; align-items: center; padding-top: 6px; border-top: 1px dashed #cbd5e1; }
.sfq__qr img { width: 150px; height: 150px; flex: 0 0 150px; background: #fff; }
.sfq__qr p { font-size: 13px; color: #334155; }
.sfq__contact input { width: 100%; border: 1.5px solid #cbd5e1; border-radius: 12px; padding: 10px 12px; font-size: 15px; background: #fff; color: #0f172a; height: auto; }
.sfq__contact input:focus { outline: none; border-color: #0071e3; box-shadow: 0 0 0 3px rgba(0, 113, 227, .15); }
.sfq__contact small { font-size: 11.5px; color: #94a3b8; }

/* ── quick answers + input ── */
.sfq__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; max-height: 40%; overflow-y: auto; flex-shrink: 0; }
.sfq__chips:empty { display: none; }
.sfq .sfq__chip { border: 1.5px solid #bfdbfe; background: #fff; color: #0057b0; border-radius: 999px; padding: 7px 12px; font-size: 13.5px; cursor: pointer; line-height: 1.2; text-align: left; }
.sfq .sfq__chip:hover { background: #eff6ff; border-color: #0071e3; }
.sfq__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid #e2e8f0; }
.sfq__form textarea { flex: 1; resize: none; border: 1.5px solid #cbd5e1; border-radius: 14px; padding: 10px 12px; font-size: 15px; line-height: 1.4; max-height: 120px; height: 44px; background: #fff; color: #0f172a; }
.sfq__form textarea:focus { outline: none; border-color: #0071e3; }
.sfq .sfq__cam, .sfq .sfq__send { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sfq .sfq__cam { background: #eff6ff; color: #0071e3; }
.sfq .sfq__cam:hover { background: #dbeafe; }
.sfq .sfq__send { background: #0071e3; color: #fff; }
.sfq .sfq__send:disabled { opacity: .5; }

/* ── the computer's camera ── */
.sfq__camera { position: absolute; inset: 0; z-index: 3; background: #000; display: flex; flex-direction: column; }
.sfq__camera[hidden] { display: none; }
.sfq__camera video { flex: 1; width: 100%; min-height: 0; object-fit: contain; }
.sfq__camera-bar { display: flex; align-items: center; justify-content: center; gap: 40px; padding: 18px; }
.sfq .sfq__shutter { width: 68px; height: 68px; border-radius: 50%; border: 5px solid #fff; background: #ef4444; cursor: pointer; padding: 0; }

@media (max-width: 768px) {
    .sfq__box { width: 100%; max-width: none; height: 100%; max-height: 100dvh; border-radius: 0; }
    .sfq__msg { max-width: 90%; }
}

/* ── the buttons on the pages ── */
.sfq-cta { display: flex; align-items: center; gap: 16px; margin: 18px 0; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, #eff6ff, #f5f3ff); border: 1px solid #c7d2fe; text-align: left; }
.sfq-cta__icon { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #0071e3, #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; }
.sfq-cta__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sfq-cta__text b { font-size: 16px; color: #0f172a; line-height: 1.3; }
.sfq-cta__text span { font-size: 14px; color: #475569; line-height: 1.4; }
button.sfq-cta__btn { flex: 0 0 auto; width: auto; margin: 0; border: none; border-radius: 12px; padding: 12px 18px; background: #0071e3; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; box-shadow: 0 8px 20px rgba(0, 113, 227, .3); }
button.sfq-cta__btn:hover { background: #005bb8; }
.sfq-cta--compact { margin: 12px 0 0; padding: 12px 14px; gap: 12px; }
.sfq-cta--compact .sfq-cta__icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 12px; }
.sfq-cta--compact .sfq-cta__text b { font-size: 14.5px; }
.sfq-cta--compact .sfq-cta__text span { font-size: 13px; }
@media (max-width: 640px) {
    .sfq-cta { flex-wrap: wrap; }
    .sfq-cta__text { flex-basis: calc(100% - 70px); }
    button.sfq-cta__btn { width: 100%; }
    .sfq-cta--compact .sfq-cta__text span { display: none; }     /* the brand page: the model list must stay close */
    .sfq-cta--compact button.sfq-cta__btn { padding: 10px 14px; }
}
/* menu: the link on desktop, a pill next to the hamburger on phones */
.nav-links a.nav-quote { color: #fff; background: linear-gradient(135deg, #0071e3, #7c3aed); border-radius: 999px; padding: 6px 14px; font-weight: 700; white-space: nowrap; }
.nav-links a.nav-quote:hover { opacity: .9; }
button.nav-quote-mobile { display: none; }
@media (max-width: 1199.98px) {   /* the hamburger breakpoint of style.css */
    button.nav-quote-mobile { display: inline-flex; align-items: center; gap: 5px; width: auto; margin: 0 10px 0 auto; padding: 7px 12px; border: none; border-radius: 999px; background: linear-gradient(135deg, #0071e3, #7c3aed); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; line-height: 1.1; }
}
/* phones: the full label next to the logo - smaller, and on two lines when it is long ("Preventivo immediato") */
@media (max-width: 440px) { button.nav-quote-mobile { font-size: 12px; padding: 5px 10px; margin: 0 8px 0 auto; max-width: 118px; white-space: normal; text-align: center; line-height: 1.15; flex-shrink: 1; } }
@media (max-width: 340px) { button.nav-quote-mobile .nav-quote-mobile__txt { display: none; } }
