#amu-law-chatbot-floating {
  position: fixed;
  bottom: 20px;
  right: 82%;
  width: 320px;
  max-width: calc(100vw - 40px);
  font-family: Arial, sans-serif;
  z-index: 9999;
  transition: all 0.3s ease;
}

/* Responsywność - urządzenia mobilne */
@media (max-width: 768px) {
  #amu-law-chatbot-floating {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 10px;
  }
}

.chat-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #002d69 0%, #003d79 100%);
  color: white;
  padding: 12px;
  cursor: pointer;
  border-radius: 12px 12px 0 0;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 45, 105, 0.3);
}

.chat-toggle:hover {
  background: linear-gradient(135deg, #003d79 0%, #004d89 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 45, 105, 0.4);
}

.chat-toggle img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.chat-header {
  display: flex;
  font-size: 18px;
  align-items: center;
  background: linear-gradient(135deg, #002d69 0%, #003d79 100%);
  color: #f9b000;
  padding: 12px;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.chat-box {
  background: #fff;
  border: 3px solid #002d69;
  border-top: none;
  display: flex;
  flex-direction: column;
  height: 450px;
  max-height: 70vh;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 20px rgba(0, 45, 105, 0.2);
  animation: slideUp 0.3s ease-out;
}

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

.chat-window {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  scroll-behavior: smooth;
}

/* Stylizacja paska przewijania */
.chat-window::-webkit-scrollbar {
  width: 6px;
}

.chat-window::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.chat-window::-webkit-scrollbar-thumb {
  background: #002d69;
  border-radius: 3px;
}

.chat-window::-webkit-scrollbar-thumb:hover {
  background: #003d79;
}

.chat-messages {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.chat-messages > div {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease-out;
}

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

/* Wiadomości użytkownika */
.chat-messages > div:has(strong:contains("Ty")) {
  background: #e3f2fd;
  border-left: 4px solid #002d69;
  margin-left: 20px;
}

/* Wiadomości asystenta */
.chat-messages > div:not(:has(strong:contains("Asystent"))) {
  background: #fff;
  border: 1px solid #e0e0e0;
  margin-right: 20px;
}

.chat-messages strong {
  color: #002d69;
  font-weight: 600;
}

.chat-messages a {
  color: #002d69;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.chat-messages a:hover {
  color: #f9b000;
  text-decoration: none;
}

/* Stan ładowania */
.loading {
  background: #fff3cd !important;
  border: 1px solid #ffeaa7 !important;
  color: #856404;
  font-style: italic;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.chat-input-group {
  display: flex;
  border-top: 2px solid #e0e0e0;
  background: #fff;
  border-radius: 0 0 8px 8px;
}

#chat-input {
  flex: 1;
  border: none;
  padding: 15px;
  font-size: 14px;
  color: #333;
  background-color: #fff;
  outline: none;
  resize: none;
  min-height: 20px;
  max-height: 80px;
  line-height: 1;
}

#chat-input:focus {
  background-color: #f8f9fa;
}

#chat-input::placeholder {
  color: #6c757d;
  font-style: italic;
}

#chat-send {
  background: linear-gradient(135deg, #002d69 0%, #003d79 100%);
  color: white;
  border: none;
  padding: 15px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 0 8px 0;
  transition: all 0.2s ease;
  min-width: 80px;
}

#chat-send:hover:not(:disabled) {
  background: linear-gradient(135deg, #003d79 0%, #004d89 100%);
  transform: translateY(-1px);
}

#chat-send:active {
  transform: translateY(0);
}

#chat-send:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Dodatkowe ulepszenia UX */
.chat-input-group:focus-within {
  border-top-color: #002d69;
}

/* ✅ NOWE: Sugestie pytań */
.chat-suggestions {
  margin: 15px 0;
  padding: 12px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
  border-radius: 8px;
  border-left: 4px solid #002d69;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestions-title {
  font-size: 13px;
  font-weight: 600;
  color: #002d69;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.suggestion-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin: 6px 0;
  background: #fff;
  border: 2px solid #002d69;
  border-radius: 6px;
  color: #002d69;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  line-height: 1.4;
}

.suggestion-btn:hover {
  background: #002d69;
  color: #fff;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0, 45, 105, 0.2);
}

.suggestion-btn:active {
  transform: translateX(3px) scale(0.98);
}

/* Animacja pojawiania się chatbota */
#amu-law-chatbot-floating.just-loaded {
  animation: bounceIn 0.9s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Dostępność - focus indicators */
.chat-toggle:focus,
#chat-send:focus,
#chat-input:focus {
  outline: 2px solid #f9b000;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .chat-box {
    border-width: 4px;
  }
  
  .chat-messages > div {
    border-width: 2px;
  }
  
  .chat-toggle, #chat-send {
    border: 2px solid #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}