/* =====================================================
   OzCruising - Live Support Chat Widget Styling
   ===================================================== */

/* Floating Chat Trigger Button */
.oz-chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FF5E14;
  color: #FFFFFF;
  border: none;
  border-radius: 50px;
  padding: 12px 20px 12px 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 25px -5px rgba(255, 94, 20, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.oz-chat-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 15px 30px -5px rgba(255, 94, 20, 0.5);
  background: #E04E0B;
}

.oz-chat-fab:active {
  transform: translateY(0) scale(0.98);
}

.oz-chat-avatar-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 1rem;
}

.oz-chat-online-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #10B981;
  border: 2px solid #FF5E14;
  border-radius: 50%;
}

.oz-chat-fab-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #DC2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Chat Popup Window */
.oz-chat-window {
  position: fixed;
  bottom: 86px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(10, 37, 64, 0.25), 0 0 1px 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.oz-chat-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header */
.oz-chat-header {
  background: #0A2540;
  color: #FFFFFF;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid #FF5E14;
}

.oz-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.oz-chat-header-avatar {
  width: 36px;
  height: 36px;
  background: #1E3A5F;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FF5E14;
  font-size: 1.1rem;
}

.oz-chat-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.oz-chat-header-sub {
  font-size: 0.75rem;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.oz-chat-header-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
}

.oz-chat-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.oz-chat-close-btn:hover {
  color: #FFFFFF;
}

/* Messages Body */
.oz-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.oz-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: ozMsgFadeIn 0.2s ease;
}

@keyframes ozMsgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.oz-chat-msg.bot,
.oz-chat-msg.agent {
  align-self: flex-start;
}

.oz-chat-msg.customer {
  align-self: flex-end;
}

.oz-chat-msg-sender {
  font-size: 0.72rem;
  color: #64748B;
  margin-bottom: 3px;
  font-weight: 600;
  padding: 0 4px;
}

.oz-chat-msg.customer .oz-chat-msg-sender {
  align-self: flex-end;
}

.oz-chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.oz-chat-msg.bot .oz-chat-bubble,
.oz-chat-msg.agent .oz-chat-bubble {
  background: #FFFFFF;
  color: #0A2540;
  border: 1px solid #E2E8F0;
  border-top-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.oz-chat-msg.agent .oz-chat-bubble {
  background: #F0FDF4;
  border-color: #DCFCE7;
  color: #064E3B;
}

.oz-chat-msg.customer .oz-chat-bubble {
  background: #FF5E14;
  color: #FFFFFF;
  border-top-right-radius: 4px;
}

.oz-chat-msg-time {
  font-size: 0.68rem;
  color: #94A3B8;
  margin-top: 4px;
  padding: 0 4px;
}

.oz-chat-msg.customer .oz-chat-msg-time {
  align-self: flex-end;
}

/* Quick Prompt Suggestions */
.oz-chat-quick-actions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 16px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
}

.oz-chat-chip {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0A2540;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.oz-chat-chip:hover {
  background: #FFEBE1;
  color: #FF5E14;
  border-color: #FFD2BC;
}

/* Footer Input Area */
.oz-chat-input-area {
  padding: 12px 14px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.oz-chat-input {
  flex: 1;
  border: 1px solid #CBD5E1;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.oz-chat-input:focus {
  border-color: #FF5E14;
  box-shadow: 0 0 0 3px rgba(255, 94, 20, 0.15);
}

.oz-chat-send-btn {
  background: #FF5E14;
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.oz-chat-send-btn:hover {
  background: #E04E0B;
  transform: scale(1.05);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .oz-chat-window {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .oz-chat-fab {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px 10px 12px;
  }
}


/* Pre-Chat Welcome Screen */
.oz-chat-welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  background: #F8FAFC;
  box-sizing: border-box;
}

.oz-chat-welcome-card {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(10, 37, 64, 0.06);
  text-align: center;
  box-sizing: border-box;
}

.oz-chat-welcome-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #FFEBE1;
  color: #FF5E14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin: 0 auto 12px;
}

.oz-chat-welcome-title {
  margin: 0 0 6px;
  font-size: 1.12rem;
  font-weight: 800;
  color: #0A2540;
}

.oz-chat-welcome-desc {
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: #64748B;
  line-height: 1.45;
}

.oz-chat-field-wrap {
  text-align: left;
  margin-bottom: 14px;
}

.oz-chat-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.oz-chat-name-input {
  width: 100%;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 0.92rem;
  color: #0A2540;
  outline: none;
  background: #FFFFFF;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: inherit;
}

.oz-chat-name-input:focus {
  border-color: #FF5E14;
  box-shadow: 0 0 0 3px rgba(255, 94, 20, 0.15);
}

.oz-chat-start-btn {
  width: 100%;
  background: #E2E8F0;
  color: #94A3B8;
  border: none;
  border-radius: 8px;
  padding: 13px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
  opacity: 0.65;
  pointer-events: none;
}

.oz-chat-start-btn:not(:disabled),
.oz-chat-start-btn.active {
  background: #FF5E14;
  color: #FFFFFF;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgba(255, 94, 20, 0.35);
}

.oz-chat-start-btn:not(:disabled):hover,
.oz-chat-start-btn.active:hover {
  background: #E04E0B;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 94, 20, 0.45);
}

.oz-chat-welcome-badges {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
}

.oz-chat-badge-item {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Conversation Area */
.oz-chat-conversation-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
