/* OrezeroBot Widget */
#ozbot-wrapper * { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Chat window ---- */
#ozbot-window {
  flex-direction: column;
  width: 360px;
  height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.15), 0 2px 8px rgba(0,0,0,.08);
  overflow: hidden;
  margin-bottom: 12px;
  animation: ozbot-slide-up .25s ease;
}

@keyframes ozbot-slide-up {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Header ---- */
#ozbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #fff;
  flex-shrink: 0;
}
#ozbot-header-info { display: flex; align-items: center; gap: 10px; }
#ozbot-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; background: rgba(255,255,255,.2); color: #fff;
}
#ozbot-bot-name { font-weight: 600; font-size: 14px; }
#ozbot-status   { font-size: 11px; opacity: .85; }
#ozbot-close {
  background: none; border: none; color: rgba(255,255,255,.8);
  font-size: 16px; cursor: pointer; padding: 4px; line-height: 1;
  border-radius: 4px; transition: background .15s;
}
#ozbot-close:hover { background: rgba(255,255,255,.15); }

/* ---- Messages ---- */
#ozbot-messages {
  flex: 1; overflow-y: auto; padding: 16px 14px; display: flex;
  flex-direction: column; gap: 10px; background: #f7f6f3;
}
#ozbot-messages::-webkit-scrollbar { width: 4px; }
#ozbot-messages::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.ozbot-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 85%; }
.ozbot-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.ozbot-msg-bot  { align-self: flex-start; }

.ozbot-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; background: #e8e5df; color: #444;
}

.ozbot-bubble-inner {
  padding: 13px 18px; border-radius: 16px; font-size: 14px;
  line-height: 1.5; word-break: break-word;
}
.ozbot-msg-user .ozbot-bubble-inner {
  background: #002868; color: #fff;
  border-bottom-right-radius: 4px;
}
.ozbot-msg-bot .ozbot-bubble-inner {
  background: #d6eaf8 !important; color: #1a1a2e !important;
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.ozbot-typing-bubble { display: flex; align-items: center; gap: 5px; padding: 12px 16px; }
.ozbot-typing-bubble span {
  width: 7px; height: 7px; border-radius: 50%; background: #aaa;
  animation: ozbot-bounce .9s infinite;
}
.ozbot-typing-bubble span:nth-child(2) { animation-delay: .15s; }
.ozbot-typing-bubble span:nth-child(3) { animation-delay: .3s; }
@keyframes ozbot-bounce {
  0%,60%,100% { transform: translateY(0); }
  30%          { transform: translateY(-6px); }
}

/* ---- Extras (Calendly, contacts) ---- */
#ozbot-extras { padding: 0 14px 8px; display: flex; flex-direction: column; gap: 6px; background: #f7f6f3; }
.ozbot-extras-btn {
  display: block; padding: 9px 14px; border-radius: 8px; text-align: center;
  font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1.5px solid; transition: all .18s;
}

/* ---- Input area ---- */
#ozbot-input-area {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; background: #fff; border-top: 1px solid #e8e5df; flex-shrink: 0;
}
#ozbot-input {
  flex: 1; border: 1.5px solid #e8e5df; border-radius: 20px;
  padding: 8px 14px; font-size: 14px; outline: none; font-family: inherit;
  transition: border-color .2s, box-shadow .2s; background: #f7f6f3;
}
#ozbot-send {
  width: 36px; height: 36px; border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
  flex-shrink: 0; transition: transform .15s, opacity .15s;
}
#ozbot-send:hover { transform: scale(1.08); }
#ozbot-send:active { transform: scale(.95); }

/* ---- Bubble button ---- */
#ozbot-bubble {
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); transition: transform .2s, box-shadow .2s;
  position: relative;
}
#ozbot-bubble:hover  { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#ozbot-bubble:active { transform: scale(.96); }
#ozbot-bubble.active { transform: scale(.95); }

/* Badge */
#ozbot-badge {
  position: absolute; top: -2px; right: -2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #e53e3e; color: #fff; font-size: 11px; font-weight: 700;
  align-items: center; justify-content: center; border: 2px solid #fff;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  #ozbot-window { width: calc(100vw - 24px); height: 70vh; }
}
