/* TMC Bot Styles */

.tmc-bot-button {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1CD763 0%, #0A0A0B 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(28, 215, 99, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.tmc-bot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(28, 215, 99, 0.6);
}

.tmc-bot-window {
  position: fixed;
  bottom: 160px;
  right: 24px;
  width: 380px;
  height: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 999;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tmc-bot-header {
  background: linear-gradient(135deg, #1CD763 0%, #158a45 100%);
  color: white;
  padding: 20px;
  border-radius: 16px 16px 0 0;
}

.tmc-bot-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tmc-bot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  overflow: hidden;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tmc-bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.tmc-bot-header h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.tmc-bot-header p {
  margin: 4px 0 0 0;
  font-size: 13px;
  opacity: 1;
  font-weight: 500;
}

.tmc-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tmc-bot-messages::-webkit-scrollbar {
  width: 6px;
}

.tmc-bot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.tmc-bot-messages::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.tmc-bot-message {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tmc-bot-message.user {
  justify-content: flex-end;
}

.tmc-bot-message.assistant {
  justify-content: flex-start;
}

.tmc-bot-message-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 14px;
}

.tmc-bot-message.user .tmc-bot-message-content {
  background: linear-gradient(135deg, #1CD763 0%, #0A0A0B 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.tmc-bot-message.assistant .tmc-bot-message-content {
  background: white;
  color: #2d3748;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tmc-bot-message-content a {
  color: #1CD763;
  text-decoration: underline;
  word-break: break-all;
}

.tmc-bot-message.user .tmc-bot-message-content a {
  color: #ffffff;
  font-weight: 600;
}

.tmc-bot-message-content a:hover {
  opacity: 0.8;
}

.tmc-bot-typing {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.tmc-bot-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1CD763;
  animation: typing 1.4s infinite;
}

.tmc-bot-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.tmc-bot-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.tmc-bot-input-form {
  display: flex;
  gap: 8px;
  padding: 16px;
  background: white;
  border-top: 1px solid #e2e8f0;
}

.tmc-bot-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.tmc-bot-input:focus {
  border-color: #1CD763;
}

.tmc-bot-input:disabled {
  background: #f7fafc;
  cursor: not-allowed;
}

.tmc-bot-send-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1CD763 0%, #0A0A0B 100%);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tmc-bot-send-button:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(28, 215, 99, 0.4);
}

.tmc-bot-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Responsive */

/* Large Desktop (1201px and up) */
@media (min-width: 1201px) {
  .tmc-bot-window {
    width: 420px;
    height: 650px;
  }
}

/* Desktop (1025px to 1200px) */
@media (max-width: 1200px) and (min-width: 1025px) {
  .tmc-bot-window {
    width: 380px;
    height: 600px;
  }
}

/* Tablet (769px to 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .tmc-bot-window {
    width: 360px;
    height: 550px;
    right: 20px;
    bottom: 140px;
  }

  .tmc-bot-button {
    bottom: 70px;
    right: 20px;
    width: 56px;
    height: 56px;
  }

  .tmc-bot-header {
    padding: 18px;
  }

  .tmc-bot-header h3 {
    font-size: 18px;
  }

  .tmc-bot-header p {
    font-size: 12px;
  }

  .tmc-bot-messages {
    padding: 18px;
  }
}

/* Large Mobile (481px to 768px) */
@media (max-width: 768px) and (min-width: 481px) {
  .tmc-bot-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 180px);
    right: 20px;
    bottom: 120px;
    max-width: 350px;
  }

  .tmc-bot-button {
    bottom: 60px;
    right: 20px;
    width: 54px;
    height: 54px;
  }

  .tmc-bot-header {
    padding: 16px;
  }

  .tmc-bot-avatar {
    width: 44px;
    height: 44px;
  }

  .tmc-bot-header h3 {
    font-size: 17px;
  }

  .tmc-bot-header p {
    font-size: 12px;
  }

  .tmc-bot-messages {
    padding: 16px;
    gap: 10px;
  }

  .tmc-bot-message-content {
    max-width: 80%;
    padding: 10px 14px;
    font-size: 13px;
  }

  .tmc-bot-input-form {
    padding: 14px;
  }

  .tmc-bot-input {
    padding: 10px 14px;
    font-size: 13px;
  }

  .tmc-bot-send-button {
    width: 40px;
    height: 40px;
  }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
  .tmc-bot-window {
    width: calc(100vw - 20px);
    height: calc(100vh - 140px);
    right: 10px;
    bottom: 100px;
    border-radius: 12px;
  }

  .tmc-bot-button {
    bottom: 50px;
    right: 10px;
    width: 50px;
    height: 50px;
  }

  .tmc-bot-header {
    padding: 14px;
    border-radius: 12px 12px 0 0;
  }

  .tmc-bot-avatar {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.9);
  }

  .tmc-bot-header h3 {
    font-size: 16px;
    letter-spacing: 0.2px;
  }

  .tmc-bot-header p {
    font-size: 11px;
    margin: 2px 0 0 0;
  }

  .tmc-bot-messages {
    padding: 14px;
    gap: 8px;
  }

  .tmc-bot-message-content {
    max-width: 85%;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
  }

  .tmc-bot-input-form {
    padding: 12px;
    gap: 6px;
  }

  .tmc-bot-input {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 20px;
  }

  .tmc-bot-send-button {
    width: 36px;
    height: 36px;
  }

  .tmc-bot-send-button svg {
    width: 16px;
    height: 16px;
  }
}

/* Very Small Mobile (up to 360px) */
@media (max-width: 360px) {
  .tmc-bot-window {
    width: calc(100vw - 16px);
    height: calc(100vh - 120px);
    right: 8px;
    bottom: 90px;
  }

  .tmc-bot-button {
    bottom: 45px;
    right: 8px;
    width: 46px;
    height: 46px;
  }

  .tmc-bot-header {
    padding: 12px;
  }

  .tmc-bot-header-content {
    gap: 10px;
  }

  .tmc-bot-avatar {
    width: 36px;
    height: 36px;
  }

  .tmc-bot-header h3 {
    font-size: 15px;
  }

  .tmc-bot-header p {
    font-size: 10px;
  }

  .tmc-bot-messages {
    padding: 12px;
  }

  .tmc-bot-message-content {
    padding: 6px 10px;
    font-size: 12px;
  }

  .tmc-bot-input-form {
    padding: 10px;
  }

  .tmc-bot-input {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Landscape Mobile Devices */
@media (max-height: 500px) and (orientation: landscape) {
  .tmc-bot-window {
    height: calc(100vh - 60px);
    bottom: 50px;
  }

  .tmc-bot-button {
    bottom: 20px;
  }

  .tmc-bot-header {
    padding: 10px;
  }

  .tmc-bot-avatar {
    width: 32px;
    height: 32px;
  }

  .tmc-bot-header h3 {
    font-size: 14px;
  }

  .tmc-bot-header p {
    font-size: 10px;
  }

  .tmc-bot-messages {
    padding: 10px;
  }
}
