:root {
  /* Light Theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --card-btn-hover: #555555;
  --border-color: rgba(0, 0, 0, 0.08);
  --primary-accent: #112d5c;
  --primary-gradient: linear-gradient(135deg, #112d5c 0%, #1a3c75 100%);
  --text-main: #fff;
  --text-muted: #64748b;
  --bot-msg-bg: #153f7b;
  --user-msg-bg: #555555;
  --chat-header-bg: rgb(19, 49, 99);
  --input-bg: #fff;
  --input-focus-bg: #ffffff;
  --input-border: transparent;
  --input-focus-border: #133163;
  --input-text: #000;
  --button-blue: #0066cc;
  --button-blue-hover: #0052a3;
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  --card-title-color: #000;
  --tooltip-bg: #ffffff;
  --tooltip-text: #112d5c;
  --pulse-ring-bg: #a2b4d4;
  --scrollbar-bg: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;
  --scrollbar-thumb-hover: #94a3b8;
}

[data-theme="dark"] {
  /* Dark Theme - Black and White with Blue Buttons */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #1a1a1a;
  --border-color: rgba(255, 255, 255, 0.1);
  --primary-accent: #fff;
  --primary-gradient: linear-gradient(135deg, #383838 0%, #000000 100%);
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --bot-msg-bg: #1a1a1a;
  --user-msg-bg: #2a2a2a;
  --chat-header-bg: #000000;
  --input-bg: #1a1a1a;
  --input-focus-bg: #2a2a2a;
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus-border: #0066cc;
  --input-text: #fff;
  --button-blue: #0066cc;
  --button-blue-hover: #0052a3;
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  --card-title-color: #fff;
  --tooltip-bg: #1a1a1a;
  --tooltip-text: #ffffff;
  --pulse-ring-bg: #383838;
  --scrollbar-bg: #1a1a1a;
  --scrollbar-thumb: #333333;
  --scrollbar-thumb-hover: #555555;
}

/** {*/
/*  box-sizing: border-box;*/
/*  margin: 0;*/
/*  padding: 0;*/
/*  font-family: "Plus Jakarta Sans", sans-serif;*/
/*}*/

/*body {*/
/*  background-color: #fff;*/
/*  min-height: 100vh;*/
/*  overflow-x: hidden;*/
/*  transition: background-color 0.3s ease;*/
/*}*/

/* Floating Trigger Button */
.chat-trigger-wrapper {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: var(--pulse-ring-bg);
  animation: pulse-wave 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  z-index: -1;
}

@keyframes pulse-wave {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.chat-trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.notification-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #ff4757;
  border: 2px solid var(--bg-card);
  border-radius: 50%;
}

.trigger-tooltip {
  position: absolute;
  right: 75px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  padding: 8px 14px;
  font-weight: 600;
  border-radius: 8px 8px 0 8px;
  font-size: 13px;
  white-space: nowrap;
  border: 1px solid var(--border-color);
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

/* Chat Box Window */
.chat-box {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  height: 520px;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.95);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.chat-header {
  padding: 16px 20px;
  background: var(--chat-header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s ease;
}

.bot-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  padding: 2px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar .brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.bot-details h4 {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
}

.bot-details span {
  color: #3aed02;
  font-size: 12px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.bot-details span::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #3aed02;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 8px #3aed02;
}

.bot-details span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 6px;
  height: 6px;
  background: #3aed02;
  border-radius: 50%;
  z-index: 1;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

.close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.close-btn:hover {
  opacity: 1;
}

/* Chat Messages Container */
.chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(
    rgba(248, 250, 252, 0.95),
    rgba(248, 250, 252, 0.97)
  );
  background-size: cover;
  background-position: right;
  background-repeat: no-repeat;
  transition: background 0.3s ease;
}

[data-theme="dark"] .chat-body {
  background: linear-gradient(rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.97));
}

/* Dynamic Message Layout Structures */
.message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 85%;
  opacity: 0;
  transform: translateY(15px);
}

.message-row.bot {
  align-self: flex-start;
}

.message-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-avatar img {
  width: 100%;
  height: 100%;
  display: block;
}

.message-avatar.bot-icon img {
  object-fit: contain;
  padding: 3px;
}

.message-avatar.user-icon img {
  object-fit: cover;
}

.message-content {
  display: flex;
  flex-direction: column;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

.message-row.bot .message-bubble {
  background: var(--bot-msg-bg);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.message-row.user .message-bubble {
  background: var(--user-msg-bg);
  color: var(--text-main);
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 10px;
  color: #8b949e;
  margin-top: 4px;
}

.message-row.bot .message-time {
  align-self: flex-start;
}

.message-row.user .message-time {
  align-self: flex-end;
}

/* Footer Input Area */
.chat-footer {
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  align-items: center;
  transition: background-color 0.3s ease;
}

.input-wrapper {
  flex: 1;
}

.input-wrapper input {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid #a9a8a86b;
  border-radius: 12px;
  color: var(--input-text);
  font-size: 13.5px;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.input-wrapper input:focus {
  border-color: var(--input-focus-border);
  background: var(--input-focus-bg);
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-gradient);
  border: none;
  color: white;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

.send-btn:active {
  transform: scale(0.95);
}

@media (max-width: 480px) {
  .chat-box {
    width: calc(100% - 30px);
    right: 15px;
    bottom: 90px;
    height: 480px;
  }
}

/* Option Buttons Styles */
.option-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.option-btn {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--primary-accent);
  border-radius: 8px;
  color: var(--primary-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.option-btn:hover {
  background: var(--button-blue);
  color: #ffffff;
  border-color: var(--button-blue);
}

/* Project Card Styles */
.chatbot-project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0;
  cursor: pointer;
  transition: all 0.2s;
}

.chatbot-project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.project-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: var(--input-bg);
}

.project-info {
  padding: 12px;
}

.project-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--card-title-color);
  margin-bottom: 4px;
}

.project-location {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.project-type {
  font-size: 11px;
  background: var(--border-color);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-muted);
  display: inline-block;
  margin-bottom: 8px;
}

/* Carousel Styles */
.project-carousel {
  position: relative;
  margin: 12px 0;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  transition: transform 0.3s ease;
  gap: 0;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--button-blue);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 10;
  transition: background 0.2s;
}

.carousel-arrow:hover {
  background: var(--button-blue-hover);
}

.carousel-arrow.prev {
  left: -16px;
}

.carousel-arrow.next {
  right: -16px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(255 255 255 / 42%);
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dot.active {
  background: var(--button-blue);
  width: 15px;
  border-radius: 10px;
  transition: all 300ms linear;
}

.carousel-dot:hover {
  background: var(--button-blue-hover);
}

.carousel-indicator {
  text-align: center;
  font-size: 12px;
  color: #fff;
  margin-top: 8px;
}

.project-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.view-btn {
  flex: 1;
  padding: 8px;
  background: var(--button-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.view-btn:hover {
  background: var(--button-blue-hover);
}

/* Form Styles */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.form-input {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  background: var(--input-bg);
  color: var(--input-text);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--button-blue);
}

.submit-btn {
  padding: 10px 16px;
  background: var(--button-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: var(--button-blue-hover);
}

/* Done Button */
.done-btn {
  padding: 12px 20px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  width: 100%;
  transition: background 0.2s;
}

.done-btn:hover {
  background: #1ebc57;
}

/* Project Details Modal */
.project-details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
}

.details-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.details-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.details-info {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.back-btn {
  padding: 8px 16px;
  background: var(--text-muted);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 12px;
}

.back-btn:hover {
  background: var(--card-btn-hover);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
}

/* Chat Body specific scrollbar */
.chat-body::-webkit-scrollbar {
  width: 6px;
}

.chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}
