/* === MATCHING BOT CHAT UI ===
   Design tokens from BeCBT site:
   Primary: #01B1FE  |  CTA Green: #20DF7F  |  Text: #454545
   Font: Roboto, sans-serif  |  Headings: 'Montserrat Alternates', sans-serif
   Radius: 8px (inputs/btns), 16px (cards)
   Shadow: 0px 2px 10px 0px rgba(0,0,0,0.05)
*/

.matching-bot {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 2px 0 15px 0 rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 500px;
  overflow: hidden;
  font-family: 'Roboto', sans-serif;
  color: #454545;
}

/* --- Header --- */
.matching-bot__header {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 16px 16px 0 0;
}

.matching-bot__header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
}

.matching-bot__header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.matching-bot__header-info h2 {
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #454545;
  margin: 0;
  line-height: 1.3;
}

.matching-bot__header-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #20DF7F;
  margin-top: 2px;
}

.matching-bot__header-status::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #20DF7F;
  border-radius: 50%;
  display: inline-block;
}

/* --- Messages area --- */
.matching-bot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f9f9f9;
}

.matching-bot__messages::-webkit-scrollbar {
  width: 5px;
}

.matching-bot__messages::-webkit-scrollbar-track {
  background: transparent;
}

.matching-bot__messages::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}

/* --- Message bubbles --- */
.matching-bot__msg {
  display: flex;
  gap: 10px;
  max-width: 82%;
  animation: matchingBotFadeIn 0.35s ease;
}

@keyframes matchingBotFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.matching-bot__msg--bot {
  align-self: flex-start;
}

.matching-bot__msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.matching-bot__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  overflow: hidden;
  box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
}

.matching-bot__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.matching-bot__bubble {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
}

.matching-bot__msg--bot .matching-bot__bubble {
  background: #fff;
  color: #454545;
  border-radius: 0 16px 16px 16px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.05);
}

.matching-bot__msg--user .matching-bot__bubble {
  background: #01B1FE;
  color: #fff;
  border-radius: 16px 0 16px 16px;
}

/* --- Typing indicator --- */
.matching-bot__typing {
  display: flex;
  gap: 10px;
  align-self: flex-start;
  align-items: center;
  padding-left: 44px;
}

.matching-bot__typing-dots {
  display: flex;
  gap: 5px;
  background: #fff;
  padding: 12px 18px;
  border-radius: 0 16px 16px 16px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.05);
}

.matching-bot__typing-dots span {
  width: 7px;
  height: 7px;
  background: #01B1FE;
  border-radius: 50%;
  opacity: 0.4;
  animation: matchingBotTypingPulse 1.4s infinite;
}

.matching-bot__typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.matching-bot__typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes matchingBotTypingPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.85); }
  30% { opacity: 1; transform: scale(1); }
}

/* --- Tag chips --- */
.matching-bot__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 4px 44px;
  animation: matchingBotFadeIn 0.35s ease;
}

.matching-bot__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: #fff;
  color: #01B1FE;
  border: 1px solid #01B1FE;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.matching-bot__chip::before {
  content: '\2713';
  font-size: 11px;
  font-weight: 700;
}

.matching-bot__chip--category {
  background: #f7f7f7;
  color: #454545;
  border-color: #ddd;
  font-weight: 600;
}

.matching-bot__chip--category::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #01B1FE;
  border-radius: 50%;
}

/* --- Crisis block --- */
.matching-bot__crisis {
  background: #fff;
  border: 1px solid #FE6F61;
  border-radius: 16px;
  padding: 20px;
  margin: 4px 0;
  animation: matchingBotFadeIn 0.35s ease;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.05);
}

.matching-bot__crisis h3 {
  color: #FE6F61;
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.matching-bot__crisis p {
  font-size: 14px;
  color: #454545;
  line-height: 1.55;
  margin-bottom: 16px;
}

.matching-bot__crisis table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}

.matching-bot__crisis th {
  text-align: left;
  padding: 8px 10px;
  background: #f7f7f7;
  color: #454545;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #ddd;
}

.matching-bot__crisis td {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  color: #454545;
}

.matching-bot__crisis td a {
  color: #01B1FE;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.matching-bot__crisis td a:hover {
  color: #0090d0;
  text-decoration: underline;
}

.matching-bot__crisis td:first-child {
  font-weight: 500;
}

/* --- Results area --- */
.matching-bot__results {
  animation: matchingBotFadeIn 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Specialist card --- */
.matching-bot__spec-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: #454545;
}

.matching-bot__spec-card:hover {
  box-shadow: 2px 0 15px 0 rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: #454545;
}

.matching-bot__spec-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.matching-bot__spec-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.matching-bot__spec-info {
  flex: 1;
  min-width: 0;
}

.matching-bot__spec-slots {
  font-size: 11px;
  color: #20DF7F;
  font-weight: 600;
  margin-bottom: 2px;
}

.matching-bot__spec-slots::before {
  content: '\25CF';
  margin-right: 4px;
  font-size: 8px;
}

.matching-bot__spec-name {
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #454545;
  margin-bottom: 3px;
  line-height: 1.3;
}

.matching-bot__spec-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.matching-bot__spec-rating {
  color: #FFC21D;
  font-weight: 500;
}

.matching-bot__spec-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.matching-bot__spec-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 20px;
  color: #454545;
}

.matching-bot__spec-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  flex-shrink: 0;
}

.matching-bot__spec-price {
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #454545;
  white-space: nowrap;
}

.matching-bot__spec-btn {
  display: inline-block;
  padding: 8px 18px;
  background: #20DF7F;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.3s;
}

.matching-bot__spec-card:hover .matching-bot__spec-btn {
  background: #12DA75;
}

@media (max-width: 768px) {
  .matching-bot__spec-card {
    flex-wrap: wrap;
  }
  .matching-bot__spec-right {
    flex-direction: row;
    width: 100%;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
  }
}

.matching-bot__separator {
  text-align: center;
  font-size: 12px;
  color: #999;
  padding: 12px 0 4px;
  letter-spacing: 0.02em;
}

/* --- Buttons --- */
.matching-bot__btn {
  display: inline-block;
  padding: 12px 24px;
  background: #20DF7F;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: 'Roboto', sans-serif;
}

.matching-bot__btn:hover {
  background: #12DA75;
  color: #fff;
  text-decoration: none;
}

.matching-bot__btn:active {
  background: #02C864;
}

.matching-bot__btn--outline {
  background: #fff;
  color: #01B1FE;
  border: 1px solid #01B1FE;
}

.matching-bot__btn--outline:hover {
  background: #f0f9ff;
  color: #0090d0;
}

.matching-bot__btn--secondary {
  background: #007EFF;
}

.matching-bot__btn--secondary:hover {
  background: #0072E8;
}

/* --- No results --- */
.matching-bot__no-results {
  text-align: center;
  padding: 24px 20px;
  animation: matchingBotFadeIn 0.35s ease;
}

.matching-bot__no-results p {
  color: #454545;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* --- Input area --- */
.matching-bot__input {
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: #fff;
  border-radius: 0 0 16px 16px;
}

.matching-bot__input textarea {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  color: #454545;
  resize: none;
  outline: none;
  line-height: 1.45;
  max-height: 100px;
  background: #fff;
  transition: border-color 0.3s ease;
}

.matching-bot__input textarea:focus {
  border-color: #01B1FE;
}

.matching-bot__input textarea::placeholder {
  color: #999;
}

.matching-bot__send {
  width: 42px;
  height: 42px;
  background: #01B1FE;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.matching-bot__send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.matching-bot__send:not(:disabled):hover {
  background: #0090d0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .matching-bot {
    margin: 0;
    border-radius: 0;
    height: calc(100vh - 60px);
    box-shadow: none;
  }
  .matching-bot__header { border-radius: 0; }
  .matching-bot__input { border-radius: 0; }
  .matching-bot__msg { max-width: 90%; }
  .matching-bot__tags { padding-left: 10px; }
}
