/* ── OMEGA AUTOMATICS AI CHATBOT WIDGET STYLES ── */

#omega-chat-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 420px;
  height: 650px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 50px rgba(0, 0, 0, .15);
  display: flex;
  flex-direction: column;
  z-index: 999999;
  border: 1px solid #DDE1E7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

#omega-chat-box.hidden {
  display: none;
}

.omega-header {
  background: linear-gradient(135deg, #0D1B2A 0%, #1C3150 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #C8A84B;
  flex-shrink: 0;
}

.omega-logo {
  width: 32px;
  height: 32px;
  background: #C8A84B;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.omega-logo svg {
  width: 18px;
  height: 18px;
  fill: #0D1B2A;
}

.omega-header-text {
  flex: 1;
}

.omega-header-text h3 {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  margin: 0;
}

.omega-header-text p {
  font-size: 10px;
  color: #C8A84B;
  margin: 2px 0 0 0;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.omega-close {
  background: 0;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.omega-close:hover {
  opacity: .7;
}

.omega-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F5F6F8;
}

.omega-messages::-webkit-scrollbar {
  width: 5px;
}

.omega-messages::-webkit-scrollbar-thumb {
  background: #DDE1E7;
  border-radius: 10px;
}

.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.msg-row.user {
  flex-direction: row-reverse;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.avatar.bot {
  background: #0D1B2A;
  color: #C8A84B;
}

.avatar.user {
  background: #C8A84B;
  color: #0D1B2A;
}

.bubble {
  max-width: 70%;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  word-wrap: break-word;
}

.bubble.bot {
  background: #fff;
  border: 1px solid #DDE1E7;
  border-bottom-left-radius: 2px;
  color: #1A1F2E;
}

.bubble.bot p {
  margin: 0 0 8px 0;
}

.bubble.bot p:last-child {
  margin-bottom: 0;
}

.bubble.bot ul, .bubble.bot ol {
  margin: 4px 0 8px 0;
  padding-left: 20px;
}

.bubble.bot li {
  margin-bottom: 4px;
}

.bubble.user {
  background: #0D1B2A;
  color: #fff;
  border-bottom-right-radius: 2px;
}

.typing {
  display: flex;
  gap: 3px;
  padding: 8px 0;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C8A84B;
  animation: bounce 1s infinite;
}

.dot:nth-child(2) {
  animation-delay: .15s;
}

.dot:nth-child(3) {
  animation-delay: .3s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: .4;
  }
  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.welcome {
  text-align: center;
  padding: 20px 12px;
}

.welcome-icon {
  width: 48px;
  height: 48px;
  background: #0D1B2A;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 2px solid #C8A84B;
}

.welcome-icon svg {
  width: 24px;
  height: 24px;
  fill: #C8A84B;
}

.welcome h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0D1B2A;
  margin: 0 0 6px 0;
}

.welcome p {
  font-size: 11px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

.input-area {
  border-top: 1px solid #DDE1E7;
  background: #fff;
  padding: 12px;
  flex-shrink: 0;
}

.input-wrap {
  display: flex;
  gap: 8px;
}

.omega-input {
  flex: 1;
  border: 1px solid #DDE1E7;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
  color: #1A1F2E;
  outline: 0;
  resize: none;
  max-height: 80px;
}

.omega-input:focus {
  border-color: #0D1B2A;
  box-shadow: 0 0 0 3px rgba(13, 27, 42, .05);
}

.omega-input::placeholder {
  color: #6B7280;
}

.omega-input:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #0D1B2A;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}

.send-btn:hover:not(:disabled) {
  background: #1C3150;
}

.send-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.send-btn svg {
  fill: #fff;
  width: 16px;
  height: 16px;
}

.toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0D1B2A;
  border: 3px solid #C8A84B;
  color: #C8A84B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
  transition: all .3s;
  z-index: 999998;
}

.toggle-btn:hover {
  transform: scale(1.1);
}

.toggle-btn.hidden {
  display: none;
}

.error {
  font-size: 11px;
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 3px;
}

@media (max-width: 480px) {
  #omega-chat-box {
    width: calc(100% - 20px);
    height: calc(100vh - 40px);
    max-height: 600px;
    bottom: 10px;
    right: 10px;
  }
  
  .toggle-btn {
    bottom: 10px;
    right: 10px;
  }
  
  .bubble {
    max-width: 85%;
  }
}
