/* CHATBOT */
/* Kółko z ikoną rozmowy – białe tło, fioletowa ikona */
.profile-circle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: white; 
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; 
  transition: opacity 1s ease;
  cursor: pointer;
  z-index: 1000;
}

.profile-circle i {
  color: #4C2580; /* ikona fioletowa */
  font-size: 2rem;
  animation: pulse 2s infinite;
}

/* Pulsująca animacja */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Tooltip jako chmurka po lewej strony kółka */
.profile-circle::before {
  content: "Kliknij, aby rozpocząć rozmowę,\A z moim agentem AI...";
  white-space: pre;
  position: absolute;
  right: 100%; /* po lewej stronie kółka */
  top: 50%;
  transform: translateY(-50%) translateX(-50px);
  background: white;
  color: #4C2580;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s, transform 2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Pokaż tooltip po hover */
.profile-circle:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(-10px);
}

/* Okienko chatu */
.chatbox {
  position: fixed;
  bottom: 120px;
  right: 20px;
  width: 360px;
  height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); /* mocniejszy cień */
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 1000;
}

.chatbox.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Nagłówek chatboxa */
.chatbox-header {
  background: linear-gradient(135deg, #4C2580, #7A3CC7); /* gradient fioletowy */
  color: #fff;
  padding: 14px 16px;
  border-radius: 16px 16px 0 0;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbox-header button {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
}

.chatbox-header .chatbox-close {
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.chatbox-header .chatbox-close:hover {
  transform: scale(1.2);
}

/* Wiadomości */
.chatbox-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 0.9rem;
}

/* Animacja fade-in dla wiadomości */
@keyframes fadeInMessage {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

/* Pojedyncza wiadomość */
/* Każda wiadomość z animacją */
.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    opacity: 0;             /* start niewidoczny */
    animation: fadeInMessage 0.4s forwards; /* fade-in */
  }

  .message.bot {
    background: #f3f0fa;
    color: #4C2580;
    align-self: flex-start;
    text-align: left;
    border-bottom-left-radius: 0; /* efekt dymka */
  
  }
  
  .message.user {
    background: #7A3CC7; /* jaśniejszy fiolet */
    color: #fff;
    align-self: flex-end;      /* cała chmurka przy prawej */
    text-align: left;          /* tekst w środku wyrównany do lewej */
    margin-left: auto;         /* wypchnięcie maksymalnie do prawej */
    border-bottom-right-radius: 0; /* efekt dymka */
  }

/* Avatar agenta (bot) */
.message.bot .agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: url('Pic/kinia-small.jpg') center/cover no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0,0,0,0.1);
}

/* Tekst wiadomości wewnątrz elementu */
.message .message-text {
  line-height: 1.3;
  max-width: calc(100% - 44px);
}

/* Pole input */
.chatbox-input {
  display: flex;
  border-top: 1px solid #eee;
  padding: 8px;
  gap: 8px;
}

.chatbox-input input {
  flex: 1;
  border: none;
  padding: 10px;
  font-size: 0.9rem;
  outline: none;
  border-radius: 12px;
  background: #f7f5fc;
}

.chatbox-input button {
  background: #7A3CC7; 
  color: white;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 500;
  transition: transform 0.2s, filter 0.2s;
}

.chatbox-input button:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}


  


