#osb-root, #osb-root * { box-sizing: border-box; font-family: var(--osb-font, -apple-system, sans-serif); }

.osb-trigger {
  position: fixed; bottom: 20px; z-index: 999998;
  right: var(--osb-side-other, 20px); left: var(--osb-side, auto);
}
.osb-pos-left .osb-trigger { right: auto; left: 20px; }
.osb-pos-right .osb-trigger { right: 20px; left: auto; }

.osb-trigger {
  background: var(--osb-dark, #16233F); color: #fff; border: none; border-radius: 999px;
  padding: 13px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(20,33,58,0.35);
}
.osb-trigger-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--osb-accent, #C98A2C); flex-shrink: 0; }
.osb-trigger-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.osb-panel {
  position: fixed; bottom: 90px; z-index: 999999;
  width: var(--osb-width, 340px); max-width: calc(100vw - 32px);
  height: var(--osb-height, 460px); max-height: calc(100vh - 120px);
  background: #fff; border-radius: var(--osb-radius, 16px); box-shadow: 0 20px 50px rgba(20,33,58,0.3);
  display: none; flex-direction: column; overflow: hidden;
}
.osb-pos-right .osb-panel { right: 20px; left: auto; }
.osb-pos-left .osb-panel { left: 20px; right: auto; }
.osb-panel.osb-open { display: flex; }

.osb-header {
  background: var(--osb-dark, #16233F); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.osb-header-left { display: flex; align-items: center; gap: 8px; }
.osb-header-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.osb-title { font-size: 15px; font-weight: 700; }
.osb-close { background: none; border: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }

.osb-hours { font-size: 11px; padding: 6px 14px; background: #F4F0E6; color: var(--osb-text, #14213A); flex-shrink: 0; }

.osb-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.osb-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; }
.osb-msg-assistant { align-self: flex-start; background: #F4F0E6; color: var(--osb-text, #14213A); border-bottom-left-radius: 4px; }
.osb-msg-user { align-self: flex-end; background: var(--osb-dark, #16233F); color: #fff; border-bottom-right-radius: 4px; }
.osb-typing { opacity: 0.6; }

.osb-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(20,33,58,0.1); flex-shrink: 0; }
.osb-input, .osb-textarea {
  flex: 1; border: 1px solid rgba(20,33,58,0.15); border-radius: 8px; padding: 9px 10px;
  font-size: 13px; outline: none; width: 100%; color: var(--osb-text, #14213A);
}
.osb-input:focus, .osb-textarea:focus { border-color: var(--osb-accent, #C98A2C); }
.osb-send {
  background: var(--osb-accent, #C98A2C); color: #16233F; border: none; border-radius: 8px;
  padding: 9px 14px; font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}
.osb-send:disabled { opacity: 0.6; cursor: default; }

.osb-human-link {
  background: none; border: none; color: rgba(20,33,58,0.55); font-size: 11px; text-decoration: underline;
  cursor: pointer; padding: 8px 14px 12px; text-align: left; flex-shrink: 0;
}

.osb-ticket-form {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 12px; flex-shrink: 0;
  border-top: 1px solid rgba(20,33,58,0.1);
}
.osb-textarea { resize: vertical; font-family: inherit; }
.osb-ticket-status { font-size: 11px; color: rgba(20,33,58,0.6); }

@media (max-width: 420px) {
  .osb-panel { right: 16px !important; left: 16px !important; width: auto; }
  .osb-trigger { right: 16px; left: auto; }
}
