/* Live Inbox - floating widget */
.lib-fab{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999998;
  border: none;
  padding: 13px 22px;
  border-radius: 40px;
  background: #e8134a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.28);
  transition: background .2s, transform .2s;
  line-height: 1.2;
}
.lib-fab:hover{ background:#c40c3c; transform: translateY(-1px); }
.lib-fab-hidden{ display:none; }

.lib-panel{
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 480px;
  max-height: calc(100vh - 40px);
  z-index: 999999;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #222;
}
.lib-panel[aria-hidden="true"]{ display:none; }

.lib-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #e8134a;
  color: #fff;
}
.lib-title{ font-weight: 700; font-size: 15px; }
.lib-close{
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.lib-body{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.lib-log{
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 6px;
}
.lib-bubble{
  max-width: 82%;
  padding: 9px 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.lib-bot{
  background: #f1f1f4;
  color: #222;
  border-bottom-left-radius: 4px;
  margin-right: auto;
}
.lib-customer{
  background: #e8134a;
  color: #fff;
  border-bottom-right-radius: 4px;
  margin-left: auto;
  text-align: right;
}

.lib-chat-input{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #eee;
}
.lib-chat-txt{
  flex: 1;
  border: 1px solid #d6d6d6;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 14px;
  outline: none;
}
.lib-chat-txt:focus{ border-color: #e8134a; }
.lib-chat-send{
  border: none;
  background: #e8134a;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}

/* handoff contact form */
.lib-form-wrap{
  padding: 12px 14px 14px;
  border-top: 1px solid #eee;
  background: #fafafa;
}
.lib-handoff-note{
  font-size: 13px;
  color: #444;
  background: #fff3d6;
  border-left: 3px solid #f0a500;
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.lib-field{
  display: block;
  margin-bottom: 8px;
}
.lib-field > span{
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 3px;
}
.lib-inp{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.lib-inp:focus{ border-color: #e8134a; }
.lib-err{ color: #c2000a; font-size: 13px; margin: 6px 0; }
.lib-send{
  width: 100%;
  border: none;
  background: #e8134a;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
.lib-send:disabled{ opacity: .6; cursor: default; }

.lib-emailus{
  margin-top: 12px;
  text-align: center;
  padding-top: 10px;
  border-top: 1px dashed #ddd;
}
.lib-hint{ font-size: 12px; color: #888; margin: 0 0 6px; }
.lib-email-link{
  display: inline-block;
  color: #e8134a;
  font-weight: 600;
  font-size: 14px;
  text-decoration: underline;
}

.lib-done{
  padding: 18px 10px;
  text-align: center;
  color: #2b8a3e;
  font-weight: 600;
}

@media (max-width: 480px){
  .lib-panel{ width: calc(100vw - 24px); right: 12px; bottom: 12px; height: 70vh; }
}
