/* css/chat-widget.css
   FortuneX chat widget styles — navy (#0b2545) + gold (#ffd369)
*/

:root{
  --fx-navy: #0b2545;
  --fx-gold: #ffd369;
  --fx-radius: 12px;
  --fx-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.fx-widget-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--fx-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  box-shadow: 0 8px 24px rgba(11,37,69,0.28);
  border: 3px solid var(--fx-gold);
  cursor: pointer;
}

.fx-widget-btn svg { display: block; }

.fx-chat-window {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: 360px;
  max-width: 96vw;
  height: 520px;
  max-height: 88vh;
  border-radius: var(--fx-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(11,37,69,0.14);
  z-index: 999999;
  font-family: var(--fx-font);
}

/* header */
.fx-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--fx-navy);
  color: #fff;
}
.fx-header .logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--fx-gold);
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--fx-navy);
  font-weight:700;
  font-size:18px;
}
.fx-header .title {
  font-weight:700;
  font-size:15px;
  line-height:1;
}
.fx-header .subtitle {
  font-size:12px;
  opacity:0.9;
}

/* messages area */
.fx-messages {
  padding: 14px;
  background: #f7f9fb;
  flex: 1;
  overflow-y: auto;
}

/* message bubbles */
.fx-bubble {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  max-width: 78%;
  line-height: 1.35;
  word-wrap: break-word;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.fx-bubble.visitor {
  background: #e6f0ff;
  color: #072243;
  margin-left: auto;
  border-bottom-right-radius: 6px;
}

.fx-bubble.agent {
  background: #fff8e6;
  color: #3a2e00;
  border: 1px solid #ffebbf;
  margin-right: auto;
  border-bottom-left-radius: 6px;
  box-shadow: none;
}

.fx-msg-meta {
  font-size: 11px;
  color: #7b8697;
  margin-top: 6px;
}

/* input area */
.fx-input {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid #eee;
  background: #fff;
}
.fx-input input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
}
.fx-input button.send {
  background: var(--fx-navy);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.fx-input button.send:active { transform: translateY(1px); }

/* small helper */
.fx-small { font-size: 12px; color: #70809a; }

/* responsive */
@media (max-width:640px) {
  .fx-chat-window {
    right: 10px;
    left: 10px;
    bottom: 80px;
    width: auto;
    height: 76vh;
  }
  .fx-header .subtitle { display:none; }
}

/* Minimize button inside Open Chat */
.fx-header .fx-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.fx-header .fx-close:hover {
  opacity: 0.8;
}

/* =======================================
   NEW: Umbrella-style WE ARE ONLINE badge
======================================= */
.fx-online-badge-top {
  position: fixed;
  right: 18px;
  bottom: 82px; /* sits above button */
  background: var(--fx-gold);
  color: var(--fx-navy);
  font-weight: 700;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  z-index: 999999;
  animation: fxBadgeFloat 2.4s infinite ease-in-out;
}

@keyframes fxBadgeFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}
