* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #0d0000;
  display: flex;
  justify-content: center;
  padding-top: 50px;
  margin: 0;
}

.chat-container {
  background-color: #ffffff;
  width: 90%;
  max-width: 900px;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.logo {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

h2 {
  font-size: 1rem;
  margin: 0;
  color: #0d0000;
}

#chatbox {
  height: 300px;
  overflow-y: scroll;
  padding: 20px;
  background-color: #fae8b6;
  text-align: left;
  border-radius: 6px;
  display: none;
  font-size: 1rem;
}

.user, .bot {
  margin: 10px 0;
}

.bot b {
  color: #fa9025;
}

.timestamp {
  font-size: 0.75em;
  color: #2e2d2d;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.input-row #userInput {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #666;
  font-size: 1rem;
  background-color: #fff;
  color: #000;
}

.input-row button {
  padding: 10px 20px;
  border-radius: 5px;
  background-color: #fa9025;
  color: #1a1a1a;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  flex-shrink: 0;
}

/* Floating Chat Toggle Button */
.chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #fa9025;
  color: #1a1a1a;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10000;
  cursor: pointer;
  display: none; /* Only shown in embed mode via JS */
}

/* Embedded Chat Widget Styling */
.embedded-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  max-height: 500px;
  z-index: 9999;
  border: 2px solid #fa9025;
  background-color: #ffffff;
  flex-direction: column;
  display: flex;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.embedded-widget h2 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.embedded-widget #chatbox {
  height: 200px;
  overflow-y: auto;
  background: #fae8b6;
}

.embedded-widget .logo {
  display: none;
}

.flash {
  color: #fa9025 !important;
  transition: color 0.3s ease-in-out;
}

@media screen and (max-width: 480px) {
  .chat-container,
  .embedded-widget {
    width: 95% !important;
    right: 10px !important;
    left: 10px !important;
  }

  #chatbox {
    height: 250px;
    font-size: 0.95rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .input-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .input-row #userInput,
  .input-row button {
    width: 100%;
    font-size: 1rem;
  }
}
