@font-face {
  font-family: 'Peyda';
  src: url('/fonts/woff2/peyda-600.woff2') format('woff2');
  font-weight: 600;
  font-style: bold;
  font-display: swap;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Peyda', sans-serif;
  font-size: 16px;
  font-weight: 400;
  background-color: #e5e5ea;
  direction: rtl;
  overflow: hidden;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
  font-family: 'Peyda', sans-serif;
}

#chatbot-wrapper {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

#chat-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: #ffffff;
  padding: 0 1rem;
  border-bottom: 1px solid #dcdcdc;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font-weight: 600;
  z-index: 10;
}

#chat-header img {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  height: 50px;
  width: auto;
}

#chat-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  width: 100%;
}

#chat-container {
  margin-top: 82px;
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background-color: #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message {
  max-width: 75%;
  padding: 0.9rem 1.2rem;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.8;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  font-weight: 500;
}

.user {
  align-self: flex-end;
  background-color: rgb(181, 223, 243);
  color: #000;
  border-bottom-right-radius: 4px;
  text-align: right;
}

.assistant {
  align-self: flex-start;
  background-color: #ffffff;
  color: #000;
  border-bottom-left-radius: 4px;
  text-align: right;
}

#input-bar {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: #ffffff;
  border-top: 1px solid #ccc;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
}

#questionInput {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 14px;
  font-size: 16px; 
  font-weight: 400;
}

#sendBtn {
  padding: 0.75rem 1.2rem;
  background-color: #007aff;
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

#sendBtn:hover {
  background-color: #005bd1;
}

#resetBtn {
  position: fixed;
  top: 25px;
  left: 12px;
  background-color: #eb3030;
  color: white;
  border: none;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 999;
}

@media (max-width: 600px) {
  #input-bar {
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
  }

  #sendBtn,
  #questionInput {
    width: 100%;
    max-width: 400px;
  }

  #resetBtn {
    font-size: .8rem;
  }

  .message {
    font-size: 15px;
  }
}
