:root {
  --ticker-bar-bg: #059669;
  --ticker-bar-color: #f5f5f5;
  --date-chip-bg: rgba(255, 255, 255, 0.92);
  --date-chip-text: #2d2d2d;
}

.chatbot-widget {
  display: flex;
  flex-direction: column;
  width: clamp(320px, 82vw, 1500px);
  height: clamp(480px, 78vh, 900px);
  border-radius: 0;
  box-shadow: 0 35px 70px rgba(12, 16, 26, 0.55);
  position: relative;
  margin: 0 auto;
  overflow: hidden;

}

.ticker-bar {
  height: 32px;
  background: var(--ticker-bar-bg);
  color: var(--ticker-bar-color);
  font-size: 14px;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 12px;
}

.ticker-content {
  white-space: nowrap;
  will-change: transform;
  animation: ticker-scroll 28s linear infinite;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

.messages {
  flex: 1;
  padding: 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
  overflow-y: auto;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.header {
  padding: 22px 28px;
}

.header-right .header-icon {
  font-size: 20px;
}

.input-wrapper {
  padding: clamp(12px, 3vw, 32px);
}

.input-container {
  padding: 0;
  min-height: 0;
  background: transparent;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: var(--message-bubble-bot);
  color: var(--text-on-surface);
  border-radius: 999px;
  padding: 14px 22px;
  box-shadow: 0 18px 38px color-mix(in srgb, var(--message-bubble-bot) 45%, transparent);
}

.input-shell .input-large {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-on-surface);
  font-size: 18px;
}

.input-shell .input-large::placeholder {
  color: color-mix(in srgb, var(--text-on-surface) 65%, transparent);
}

.input-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.date-separator {
  position: relative;
  margin: 24px auto 16px;
  text-align: center;
  pointer-events: none;
  z-index: 1;
  width: fit-content;
}

.date-separator-label {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--date-chip-bg);
  color: var(--date-chip-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  box-shadow: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  pointer-events: auto;
}

.date-floating-indicator {
  position: sticky;
  top: 10px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  margin-bottom: 12px;
}

.date-floating-indicator-label {
  padding: 6px 20px;
  border-radius: 999px;
  background: var(--date-chip-bg);
  color: var(--date-chip-text);
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(20, 23, 28, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.input-shell button {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  padding: 6px;
}

.send-button-compact {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #7fe0af;
  color: #1f1f1f;
  box-shadow: 0 14px 28px rgba(127, 224, 175, 0.45);
}

.chat-toggle {
  width: 74px;
  height: 74px;
  font-size: 28px;
  box-shadow: 0 18px 40px rgba(26, 26, 67, 0.3);
}

@media (max-width: 640px) {
  .chatbot-widget {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .messages {
    padding: 20px;
  }

  .input-wrapper {
    padding: 0 16px 14px;
  }
}

.greeting-card {
  border-radius: 16px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #fff9ed 0%, #fff5d7 65%, #ffe7b7 100%);
  border: 1px solid rgba(255, 175, 0, 0.35);
  color: #3b2a1b;
  box-shadow: 0 18px 35px rgba(255, 184, 74, 0.25);
  margin-bottom: 18px;
  font-family: "Poppins", "Montserrat", sans-serif;
}

.greeting-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 134, 99, 0.15);
  color: #0b8663;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 12px;
}

.greeting-card__subtitle {
  margin: 12px 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #1f1f1f;
}

.greeting-card__hero {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}

.greeting-card__sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.greeting-card__section {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 175, 0, 0.25);
}

.greeting-card__section-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 14px;
}

.greeting-card__section-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.greeting-card__notes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.greeting-card__notes li {
  position: relative;
  padding-left: 18px;
}

.greeting-card__notes li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #d97706;
  font-size: 16px;
}

/* =====================================================
   Bot Greeting Bubble – 365Huat Promo Card
   ===================================================== */

.bot-greeting-container {
  width: 100%;
}

.bot-greeting-bubble {
  width: 100%;
  max-width: 420px;
  margin-left: 0;
  margin-right: auto;
  background: #fff;
  border-radius: 18px;
  padding: 24px 20px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* Header */
.greeting-header {
  text-align: center;
  margin-bottom: 18px;
}

.greeting-header__welcome {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.greeting-header__logo {
  max-width: 200px;
  height: auto;
}

/* CTA row */
.greeting-cta-row {
  margin-bottom: 14px;
}

.greeting-cta-row p {
  margin: 4px 0;
  font-weight: 600;
}

/* Link style */
.greeting-link {
  color: #0d9488;
  text-decoration: underline;
  font-weight: 600;
}

.greeting-link:hover {
  color: #0f766e;
}

/* Section blocks */
.greeting-section {
  margin-bottom: 12px;
}

.greeting-section__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}

.greeting-section__badge--yellow {
  background: #facc15;
  color: #1a1a1a;
}

.greeting-section__text {
  margin: 0;
  font-size: 14px;
}

/* Rules box */
.greeting-rules-box {
  background: linear-gradient(to right, #f0fdf4 0%, #ecfdf5 100%);
  border-left: 4px solid #10b981;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.greeting-rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.greeting-rules-list li {
  margin-bottom: 6px;
  font-weight: 600;
}

/* Ticker */
.greeting-ticker {
  width: 100%;
  background: #10b981;
  color: #fff;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}

.greeting-ticker__track {
  display: inline-block;
  white-space: nowrap;
  padding: 10px 0;
  font-weight: 600;
  animation: greeting-ticker-scroll 18s linear infinite;
}

@keyframes greeting-ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Websites */
.greeting-websites {
  text-align: center;
  margin-bottom: 16px;
}

.greeting-websites__title {
  margin: 0 0 10px;
  font-weight: 700;
}

.greeting-websites__badge {
  background: #22c55e;
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
}

.greeting-websites__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
  text-align: left;
}

.greeting-websites__grid p {
  margin: 0;
}

/* Notice */
.greeting-notice {
  text-align: center;
  margin-top: 14px;
}

.greeting-notice__title {
  margin: 0 0 8px;
  font-weight: 700;
}

.greeting-notice__badge {
  background: #ef4444;
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
}

.greeting-notice__text {
  margin: 0 0 8px;
  font-weight: 600;
}

.greeting-notice__warning {
  margin: 0;
  background: #fef9c3;
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
}

/* Utility colours */
.text-red {
  color: #dc2626;
  font-weight: 700;
}

.text-orange {
  color: #ea580c;
  font-weight: 700;
}

/* =====================================================
   BO Notification Cards – Base + Register Theme
   ===================================================== */

.bo-card {
  width: 100%;
  max-width: 420px;
  margin-left: 0;
  margin-right: auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  background: #fff;
}

.bo-card__inner {
  display: flex;
  flex-direction: column;
}

/* Section base */
.bo-card__section {
  padding: 18px 20px;
}

.bo-card__section--primary {
  background: #fff;
  text-align: center;
}

.bo-card__section--secondary {
  background: #fff;
  padding-top: 0;
}

.bo-card__section--footer {
  background: #fff;
  padding-top: 0;
}

/* =====================================================
   Register Card Styles
   ===================================================== */

.bo-card--register {
  border: 1px solid #d1fae5;
}

/* Header area */
.bo-register-header {
  text-align: center;
}

.bo-register-icon {
  margin-bottom: 12px;
}

.bo-register-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #16a34a;
}

.bo-register-subtitle {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

/* Credentials box */
.bo-credentials-box {
  margin-top: 16px;
  background: #f9fafb;
  border-left: 4px solid #16a34a;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
}

.bo-credentials-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bo-credentials-row:last-child {
  margin-bottom: 0;
}

.bo-credentials-label {
  color: #6b7280;
  font-weight: 500;
}

.bo-credentials-value {
  font-weight: 700;
  color: #111827;
}

.bo-credentials-link {
  color: #0d9488;
  text-decoration: underline;
}

/* Benefits list */
.bo-benefits-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bo-benefits-list li {
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
}

.bo-benefits-list li:last-child {
  margin-bottom: 0;
}

/* Ticker */
.bo-ticker {
  width: 100%;
  background: #16a34a;
  color: #fff;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 16px;
}

.bo-ticker__track {
  display: inline-block;
  white-space: nowrap;
  padding: 10px 0;
  font-weight: 600;
  animation: bo-ticker-scroll 18s linear infinite;
}

@keyframes bo-ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* CTA Buttons */
.bo-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bo-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}

.bo-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.bo-cta-btn--telegram {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.bo-cta-btn--facebook {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.bo-kv-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f7f9fb;
  border-left: 4px solid rgba(15, 118, 110, 0.4);
}

.bo-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}

.bo-kv-row:last-child {
  margin-bottom: 0;
}

.bo-kv-label {
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
  /* Prevent label from wrapping */
  flex-shrink: 0;
  /* Keep label width intact */
}

.bo-kv-value {
  color: #111827;
  font-weight: 700;
  text-align: right;
  /* Ensure value aligns right */
  word-break: break-all;
  /* Force break for long IDs */
}

/* =====================================================
   Deposit / Withdrawal / Forfeited Themes
   ===================================================== */

.bo-card--deposit {
  border: 1px solid #bae6fd;
}

.bo-card--deposit .bo-card__section--primary {
  border-left: 4px solid #0ea5e9;
}

.bo-card--deposit .bo-ticker {
  background: #0ea5e9;
}

.bo-card--deposit .bo-cta-btn {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}

.bo-card--withdrawal {
  border: 1px solid #ddd6fe;
}

.bo-card--withdrawal .bo-card__section--primary {
  border-left: 4px solid #6366f1;
}

.bo-card--withdrawal .bo-ticker {
  background: #6366f1;
}

.bo-card--withdrawal .bo-cta-btn {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
}

.bo-card--forfeited {
  border: 1px solid #fecaca;
  background: #fef2f2;
}

.bo-card--forfeited .bo-card__section {
  background: transparent;
}

.bo-card--forfeited .bo-card__section--primary {
  border-left: 4px solid #dc2626;
}

.bo-card--forfeited .bo-ticker {
  background: #dc2626;
}

.bo-card--forfeited .bo-cta-btn {
  background: linear-gradient(135deg, #fb7185 0%, #dc2626 100%);
}

/* =====================================================
   Mobile Adjustments for BO Cards
   ===================================================== */
@media (max-width: 640px) {
  .bo-card {
    font-size: 12px;
    /* Reduce base font size */
    border-radius: 14px;
    /* Slightly smaller radius */
  }

  .bo-card__section {
    padding: 12px 14px;
    /* Reduce padding */
  }

  /* Scale down icons (Register/Deposit icons) */
  .bo-register-icon svg,
  .bo-card svg {
    width: 42px;
    height: 42px;
  }

  /* Scale down titles */
  .bo-register-title,
  .bo-card h2 {
    font-size: 18px;
    /* Down from 22px */
    margin-bottom: 4px;
  }

  /* Scale down subtitles/text */
  .bo-register-subtitle,
  .bo-card p {
    font-size: 13px;
  }

  /* Adjust key-value rows (Username, Amount, etc) */
  .bo-kv-box {
    margin-top: 10px;
    padding: 10px 12px;
  }

  .bo-kv-row {
    font-size: 12px;
    margin-bottom: 6px;
  }

  /* Adjust buttons */
  .bo-cta-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 34px;
    gap: 6px;
  }

  /* Scale down button icons specifically */
  .bo-cta-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* =====================================================
   Expand Message Bubble Width for BO Cards
   ===================================================== */
/* Only expand to near-full width on smaller screens */
@media (max-width: 640px) {

  .message:has(.bo-card),
  .message:has(.bot-greeting-bubble) {
    max-width: 98% !important;
    /* Maximized width for mobile */
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* On desktop, keep a reasonable max-width but allow content to fit */
@media (min-width: 641px) {

  .message:has(.bo-card),
  .message:has(.bot-greeting-bubble) {
    width: fit-content;
    max-width: 90% !important;
    /* Allow it to grow but not force full width */
    padding-left: 12px;
    padding-right: 12px;
  }
}