/* =========================================================
   SB Home System – árajánlat-bot (guided quote chatbot)
   ========================================================= */

.sbq-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 300;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--sb-green, #6cbf3f); color: #fff;
  border: 0; cursor: pointer; padding: 14px 20px; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 30px rgba(15,45,75,.25); transition: transform .2s ease, box-shadow .2s ease;
}
.sbq-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(15,45,75,.32); }
.sbq-launcher svg { flex-shrink: 0; }
.sbq-launcher.is-hidden { display: none; }

.sbq-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 310;
  width: 380px; max-width: calc(100vw - 32px); height: 620px; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15,45,75,.28); display: none; flex-direction: column;
  font-family: inherit;
}
.sbq-panel.is-open { display: flex; }

.sbq-head {
  background: linear-gradient(120deg, var(--sb-blue-dark,#0f5b96), var(--sb-blue,#1478c4));
  color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 12px;
}
.sbq-head__avatar { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sbq-head__title { font-weight: 700; line-height: 1.2; }
.sbq-head__sub { font-size: .8rem; opacity: .85; }
.sbq-head__close { margin-left: auto; background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 1.6rem; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.sbq-head__close:hover { background: rgba(255,255,255,.15); }

.sbq-body { flex: 1; overflow-y: auto; padding: 18px; background: #f5f8fb; }
.sbq-msg { max-width: 84%; margin-bottom: 12px; padding: 11px 14px; border-radius: 14px; font-size: .95rem; line-height: 1.5; }
.sbq-msg--bot { background: #fff; color: #23262b; border: 1px solid #e3e8ee; border-bottom-left-radius: 4px; }
.sbq-msg--user { background: var(--sb-blue,#1478c4); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.sbq-msg strong { font-weight: 700; }
.sbq-estimate { background: var(--sb-green-light,#eef8e6); border: 1px solid var(--sb-green,#6cbf3f); color: #23262b; }
.sbq-estimate b { color: var(--sb-green-dark,#4f9a29); font-size: 1.15rem; }

.sbq-options { padding: 12px 18px; border-top: 1px solid #e3e8ee; background: #fff; display: flex; flex-wrap: wrap; gap: 8px; }
.sbq-opt {
  background: #fff; border: 1.5px solid var(--sb-blue,#1478c4); color: var(--sb-blue,#1478c4);
  border-radius: 999px; padding: 9px 15px; font-family: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.sbq-opt:hover { background: var(--sb-blue,#1478c4); color: #fff; }
.sbq-opt--ghost { border-color: #cbd5e1; color: var(--sb-muted,#5c6672); }
.sbq-opt--ghost:hover { background: #64748b; border-color: #64748b; color: #fff; }

.sbq-form { padding: 14px 18px; border-top: 1px solid #e3e8ee; background: #fff; }
.sbq-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.sbq-form input, .sbq-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #e3e8ee; border-radius: 8px;
  font-family: inherit; font-size: .95rem; margin-bottom: 10px;
}
.sbq-form input:focus, .sbq-form textarea:focus { outline: none; border-color: var(--sb-blue,#1478c4); }
.sbq-form textarea { min-height: 64px; resize: vertical; }
.sbq-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--sb-muted,#5c6672); margin-bottom: 10px; }
.sbq-consent input { width: auto; margin: 3px 0 0; }
.sbq-submit {
  width: 100%; background: var(--sb-green,#6cbf3f); color: #fff; border: 0; border-radius: 8px;
  padding: 12px; font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.sbq-submit:hover { background: var(--sb-green-dark,#4f9a29); }
.sbq-submit:disabled { opacity: .6; cursor: default; }

.sbq-foot { text-align: center; font-size: .72rem; color: #94a3b8; padding: 8px; background: #fff; }
.sbq-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.sbq-typing span { width: 7px; height: 7px; border-radius: 50%; background: #c3ccd6; animation: sbq-blink 1.2s infinite both; }
.sbq-typing span:nth-child(2) { animation-delay: .2s; }
.sbq-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes sbq-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

@media (max-width: 480px) {
  .sbq-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100vh - 16px); }
  .sbq-launcher { right: 14px; bottom: 14px; }
}
