:root {
  /* Light Mode */

  --smrt-chat-primary-color: var(--chat-header-background);

  --chat-background: #f9fafb;

  --chat-header-background: #e7edee;

  --chat-header-text-color: #ffffff;

  --chat-footer-background: #ffffff;

  --chat-footer-text-color: #111827;

  --chat-sender-bubble: oklch(95.1% 0.026 236.824);

  --chat-sender-text-color: #111827;

  --chat-sender-bubble-hover: #028090;

  --chat-receiver-bubble: #e5e7eb;

  --chat-receiver-text-color: #111827;

  --chat-receiver-bubble-hover: #d1d5db;

  --chat-link-color: #028090;

  --chat-button-background: #028090;

  --chat-button-text-color: #ffffff;

  --chat-button-hover-bg: #028090;

  --chat-button-hover-text-color: #ffffff;

  --chat-input-border-hover: #93c5fd;

  --chat-input-background: #ffffff;

  --chat-input-border: rgb(123, 166, 231);

  --chat-input-text-color: #111827;

  --chat-send-button-background: #028090;

  --chat-send-button-text-color: #ffffff;

  --chat-link-hover-color: #028090;

  --chat-operation-background: #028090;

  --chat-operation-text-color: #ffffff;

  --chat-operation-hover-bg: #009baf;

  --smart-chat-success-color: oklch(92.5% 0.084 155.995);

  --smart-chat-danger-color: oklch(57.7% 0.245 27.325);

  --smart-chat-text-color: #ffffff;
}

[data-theme="dark"] {
  /* Dark Mode */
  --chat-background: #0d1117;

  --chat-header-background: #161b22;

  --chat-header-text-color: #e5e7eb;

  --chat-footer-background: #1f2937;

  --chat-footer-text-color: #e5e7eb;

  --chat-sender-bubble: #5a5cd6;

  --chat-sender-text-color: #ffffff;

  --chat-sender-bubble-hover: #4c4fb8;

  --chat-receiver-bubble: #1e293b;

  --chat-receiver-text-color: #e5e7eb;

  --chat-receiver-bubble-hover: #273145;

  --chat-link-color: #3b82f6;

  --chat-button-background: #3b82f6;

  --chat-button-text-color: #ffffff;

  --chat-button-hover-bg: #60a5fa;

  --chat-button-hover-text-color: #ffffff;

  --chat-input-background: #1f2937;

  --chat-input-border: #374151;

  --chat-input-text-color: #e5e7eb;

  --chat-input-border-hover: #4b5563;

  --chat-send-button-background: #3b82f6;

  --chat-send-button-text-color: #ffffff;

  --chat-link-hover-color: #60a5fa;

  --smart-chat-success-color: oklch(92.5% 0.084 155.995);

  --smart-chat-danger-color: oklch(57.7% 0.245 27.325);
}

@font-face {
  font-family: "VazirmatnFD";
  src: url("/public/fonts/webfonts/Vazirmatn-RD-FD-Medium.woff2")
    format("woff2");
  font-weight: 400;
  font-style: normal;
}

html[lang="fa"],
body[lang="fa"] {
  font-family: "VazirmatnFD", sans-serif;
}

html[lang="en"],
body[lang="en"] {
  font-family: "Roboto", "Arial", sans-serif;
  font-weight: 400;
}

.smart-chat-body-message-avatar {
  min-width: 2.5rem;
  height: 2.5rem;
  border-radius: 100%;
}

#smart-chat-loading {
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/*new */

#smart-chat-form-builder {
  padding: 1rem;

  display: flex;

  gap: 0.5rem;

  justify-content: space-around;
}

.smart-chat-form-group {
  display: flex;

  align-items: center;

  gap: 0.5rem;
}

.smart-chat-form-group:has(.smart-chat-form-control) {
  display: grid;
}

/*input */

.smart-chat-form-control {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  background-color: white;
}

.smart-chat-form-control:focus {
  border-color: var(--chat-input-border);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.smart-chat-form-control::placeholder {
  color: #9ca3af;
}

/*check */

.smart-chat-form-group input[type="checkbox"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--chat-input-border);
  border-radius: 6px;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.smart-chat-form-group input[type="checkbox"]:checked {
  background-color: #3b82f6;
  border-color: var(--chat-input-border);
}

.smart-chat-form-group input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 5px;
  width: 5px;
  height: 0.875rem;
  border: solid white;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg) scale(0.8);
  transition: opacity 0.2s ease-in-out;
}

.smart-chat-form-group input[type="checkbox"]:checked::after {
  opacity: 1;
}

.smart-chat-form-check-label {
  font-size: 1rem;
  color: #374151;
}

/*chips */

.smart-chat-chips {
  padding: 0.5rem;
  margin: 0.5rem;
  border-radius: 9999px;
  border: 2px solid #ccc;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  font-size: 0.875rem;
  color: #333;
  box-shadow: 0 2px 0.25rem rgba(0, 0, 0, 0.1);
  width: fit-content;
}

.smart-chat-chips.smart-chat-chips-selected {
  background-color: #007bff;
  color: #fff;
  border-color: var(--chat-input-border);
  box-shadow: 0 0.25rem 0.625rem rgba(0, 123, 255, 0.3);
}

.smart-chat-chips:hover {
  border-color: var(--chat-input-border);
}

/*button */

.smart-chat-btn {
  background: var(--smrt-chat-primary-color);
  color: var(--chat-button-text-color);
  padding: 0.625rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.smart-chat-btn:hover {
  background: var(--chat-button-hover-bg);
}

.smart-chat-btn:active {
  transform: translateY(1px);
}

/*audioStyle */

.audio-progress::-webkit-slider-thumb {
  appearance: none;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--chat-button-background);
  border-radius: 50%;
  border: 2px solid var(--chat-input-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#smart-chat-emoji-picker span {
  transition: transform 0.2s ease-in-out;
}

#smart-chat-emoji-picker span:hover {
  transform: scale(1.4) rotate(5deg);
}

@keyframes fadeSlideRightToLeft {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.smart-chat-card-animate {
  opacity: 0;
  animation: fadeSlideRightToLeft 0.5s ease-out forwards;
}

/*robot loading*/

.smart-chat-robot-container {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  backdrop-filter: blur(4px);
}

.smart-chat-robot-loading {
  width: 140px;
  height: 140px;
  background: var(--smrt-chat-primary-color);
  border-radius: 50% 50% 40% 40% / 50% 50% 60% 60%;
  position: relative;
  animation: float 2s ease-in-out infinite;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.smart-chat-robot-loading::before,
.smart-chat-robot-loading::after {
  content: "";
  position: absolute;
  top: 30%;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 5px #0002;
}

.smart-chat-robot-loading::before {
  left: 25%;
  animation: eye-blink 3s infinite;
}

.smart-chat-robot-loading::after {
  right: 25%;
  animation: eye-blink 2s infinite;
}

@keyframes eye-blink {
  0%,
  95%,
  100% {
    height: 20px;
  }
  97% {
    height: 2px;
  }
}

.smart-chat-robot-antenna {
  width: 5px;
  height: 25px;
  background: var(--smrt-chat-primary-color);
  position: absolute;
  top: -25px;
  left: 49%;
  transform: translateX(-50%);
}

.smart-chat-robot-antenna::before {
  content: "";
  width: 10px;
  height: 10px;
  background: red;
  border-radius: 50%;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/*
toast
*/

.smart-chat-toast {
  min-width: 250px;
  margin-bottom: 10px;
  background-color: #323232;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  animation: slideIn 0.3s forwards, fadeOut 0.5s ease-out forwards 3.5s;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

.arrow {
  flex-shrink: 0;
  font-size: 14px;
  user-select: none;
  transition: transform 0.3s ease;
}
.custom-select-display.open .arrow {
  transform: rotate(180deg);
}
.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}
.custom-select-options.show {
  display: block;
}
.option-item {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.option-item:hover {
  background: #f0f0f0;
}
.checkbox-wrapper {
  width: 18px;
  height: 18px;
  border: 2px solid #777;
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
}
.checkbox-wrapper.checked {
  background: #007bff;
  border-color: #007bff;
}
.checkbox-wrapper.checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
