body {
  -webkit-font-smoothing: antialiased;
  /* Safari, Chrome j,gjh,fhj,hjf,f/
-moz-osx-font-smoothing: grayscale;    / Firefox na macOS /
font-smooth: always;                   / Eksperymentalne */
}

#aurelia-consent-popup p,
#aurelia-consent-popup label {
  font-size: 13px;
}

/* Aurelia Maps - Style CSS */
.aurelia-map-container {
  width: 100%;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: #ffffff;
}

.aurelia-map-frame {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
}

.map-controls {
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid #dee2e6;
}

.map-controls h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-weight: 600;
  text-align: center;
  font-size: 16px;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 15px;
}

.poi-category-btn {
  position: relative;
  padding: 10px 18px;
  border: 2px solid;
  background: transparent;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  user-select: none;
  min-width: 120px;
  text-align: center;
}

.poi-category-btn {
  outline: none;
  box-shadow: 0 0 0 3px rgba(77, 117, 247, 0.3);
}

.poi-category-btn {
  transform: scale(0.98);
}

.poi-category-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.poi-category-btn.loading::after {
  content: \'\';
  position: absolute;
  top: 50%;
  right: 8px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Kolory przycisków */
.poi-category-btn[data-category=\"Edukacja\"] {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.poi-category-btn[data-category=\"Zdrowie\"] {
  border-color: #4ecdc4;
  color: #4ecdc4;
}

.poi-category-btn[data-category=\"Zakupy\"] {
  border-color: #45b7d1;
  color: #45b7d1;
}

.poi-category-btn[data-category=\"Gastronomia\"] {
  border-color: #96ceb4;
  color: #96ceb4;
}

.poi-category-btn[data-category=\"Rekreacja\"] {
  border-color: #ffeaa7;
  color: #ffeaa7;
}

.poi-category-btn[data-category=\"Transport\"] {
  border-color: #dda0dd;
  color: #dda0dd;
}

/* Stany hover */
.poi-category-btn[data-category=\"Edukacja\"]:hover(.active) {
  background-color: rgba(255, 107, 107, 0.1);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.poi-category-btn[data-category=\"Zdrowie\"]:hover(.active) {
  background-color: rgba(78, 205, 196, 0.1);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.poi-category-btn[data-category=\"Zakupy\"]:hover(.active) {
  background-color: rgba(69, 183, 209, 0.1);
  box-shadow: 0 4px 12px rgba(69, 183, 209, 0.3);
}

.poi-category-btn[data-category=\"Gastronomia\"]:hover(.active) {
  background-color: rgba(150, 206, 180, 0.1);
  box-shadow: 0 4px 12px rgba(150, 206, 180, 0.3);
}

.poi-category-btn[data-category=\"Rekreacja\"]:hover(.active) {
  background-color: rgba(255, 234, 167, 0.1);
  box-shadow: 0 4px 12px rgba(255, 234, 167, 0.3);
}

.poi-category-btn[data-category=\"Transport\"]:hover(.active) {
  background-color: rgba(221, 160, 221, 0.1);
  box-shadow: 0 4px 12px rgba(221, 160, 221, 0.3);
}

/* Stan aktywny */
.poi-category-btn.active {
  color: #ffffff !important;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.poi-category-btn[data-category=\"Edukacja\"].active {
  background-color: #ff6b6b;
}

.poi-category-btn[data-category=\"Zdrowie\"].active {
  background-color: #4ecdc4;
}

.poi-category-btn[data-category=\"Zakupy\"].active {
  background-color: #45b7d1;
}

.poi-category-btn[data-category=\"Gastronomia\"].active {
  background-color: #96ceb4;
}

.poi-category-btn[data-category=\"Rekreacja\"].active {
  background-color: #ffeaa7;
  color: #333333 !important;
  /* Ciemny tekst na jasłym tle */
}

.poi-category-btn[data-category=\"Transport\"].active {
  background-color: #dda0dd;
}

.map-description {
  margin-top: 15px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  font-size: 13px;
  color: #6c757d;
  text-align: center;
  border-left: 4px solid #4d75f7;
}

.poi-counter {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  background: rgba(77, 117, 247, 0.1);
  color: #4d75f7;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Loading state dla mapy */
.map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 500px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #6c757d;
  font-size: 16px;
}

.map-loading::before {
  content: \'\';
  width: 20px;
  height: 20px;
  margin-right: 12px;
  border: 3px solid #dee2e6;
  border-top-color: #4d75f7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.map-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 500px;
  background: #f8d7da;
  color: #721c24;
  text-align: center;
  padding: 20px;
  border-radius: 8px;
}

/* Responsywność */
@media (max-width: 768px) {
  .category-buttons {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .poi-category-btn {
    width: 100%;
    max-width: 280px;
    font-size: 13px;
    padding: 12px 18px;
  }

  .map-controls {
    padding: 15px;
  }

  .map-controls h4 {
    font-size: 15px;
  }

  .aurelia-map-frame {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .poi-category-btn {
    padding: 10px 15px;
    font-size: 12px;
    min-width: 100px;
  }

  .aurelia-map-frame {
    height: 350px;
  }
}

/* Bąbelek „AI pisze…\" */
.aurelia-message.typing .message-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Kropki */
.typing-dots {
  display: inline-flex;
  gap: 6px;

  .typing-dots i {
    width: 6px;
    height: 6px;
    background: #8a8a8a;
    border-radius: 50%;
    display: block;
    opacity: .4;
    animation: aurelia-blink 1.2s infinite;
  }

  .typing-dots i:nth-child(1) {
    animation-delay: 0s;
  }

  .typing-dots i:nth-child(2) {
    animation-delay: .15s;
  }

  .typing-dots i:nth-child(3) {
    animation-delay: .3s;
  }

  0%,
  80%,
  100% {
    opacity: .3;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

#aurelia-consent-popup {
  background: #ffffffc9 !important;
  backdrop-filter: blur(3px);
}



#aurelia-consent-popup button {
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 4px;
  background-color: #5d3330;
  border: 1px solid #5d3330;
  transition: all 0.3s ease;
}

#aurelia-consent-popup button:hover {
  background-color: white;
  color: #5d3330;
  border: 1px solid #5d3330;

  transition: all 0.3s ease;
}

/* Scrollbar dla WebKit - dodane selektory dev /
#aurelia-messages::-webkit-scrollbar,
#aurelia-dev-messages::-webkit-scrollbar {
width: 8px; / trochę szerszy żeby było widać kolor */
}

#aurelia-messages::-webkit-scrollbar-track,
#aurelia-dev-messages::-webkit-scrollbar-track {
  background: #161535 !important;
  /* 🔴 tło suwaka */
  border-radius: 3px;
}

#aurelia-messages::-webkit-scrollbar-thumb,
#aurelia-dev-messages::-webkit-scrollbar-thumb {
  background-color: #4b4995 !important;
  /* 🟢 sam suwak /
border-radius: 4px;
border: 2px solid #161535; / opcjonalnie, żeby lepiej kontrastował */
}

#aurelia-messages::-webkit-scrollbar-thumb,
#aurelia-dev-messages::-webkit-scrollbar-thumb {
  background: #5d3330 !important;
  /* ciemniejsza zieleń po najechaniu */
}

#aurelia-chat,
#aurelia-dev-chat {
  display: flex;
  flex-direction: column;
}

#aurelia-messages,
#aurelia-dev-messages {
  flex: 1;
  padding: 0px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 20px;
  max-height: 1000px;
}

.aurelia-message {
  display: flex;
  max-width: 100%;
  animation: fadeIn 0.3s ease-in;
  width: 100%;
  align-content: flex-end;
  align-items: flex-end;
  flex-direction: column;
}

.user-message {
  align-self: flex-end;
  margin-right: 20px;
}

.ai-message {
  align-self: flex-start;
}

.message-content {
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
}

.message-content p,
.message-content strong,
.message-content li,
.message-content a {
  color: #fff;
  line-height: 28px;
  font-size: 16px;
}

.user-message .message-content {
  background: #ffffff !important;
  color: #333333 !important;
  border-bottom-right-radius: 0px;
  font-size: medium;
}

.ai-message .message-content {
  background: #ffffff00;
  color: #ffffff;
  border-bottom-left-radius: 0px;
  line-height: 27px;
  width: 100%;
  ;
}

.ai-message .message-content img {
  padding: 0px;
}

.message-timestamp {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
  padding: 0 4px;
}

.user-message .message-timestamp {
  text-align: right;
}

.ai-message .message-timestamp {
  text-align: left;
}

ol {
  list-style: decimal outside;
  margin-left: 20px;
}

#aurelia-input-container,
#aurelia-dev-input-container {
  padding: 20px 0 0 0;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

#aurelia-input,
#aurelia-dev-input {
  flex: 1;
  border: 1px solid #ddd0;
  border-radius: 6px;
  padding: 12px 16px;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
  min-height: 20px;
  max-height: 200px;
  transition: border-color 0.2s ease;
  color: #ffffff;
  margin: 0;
  border-color: #4b499500 !important;
  box-shadow: 0 0 20px #4b498500 !important;
  background-color: #a7aaaf00;
}

#aurelia-input,
#aurelia-dev-input {
  border-color: #4b499500 !important;
  box-shadow: 0 0 50px 20px #5d333000 !important;
  background-color: #1f1e3f00;
}

#aurelia-send:hover(),
#aurelia-dev-send:hover() {
  background: #865450;
  box-shadow: 0 0 50px 20px #865450;
}

#aurelia-send,
#aurelia-dev-send {
  background: #5d3330;

}

#aurelia-loading {
  padding: 15px 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

#aurelia-consent-popup {
  background: #f8f8f8 !important;
  backdrop-filter: blur(3px);
  position: fixed;
  z-index: 9999;
  background: white;
  border: 1px solid #f8f8f8 !important;
  padding: 20px;
  max-width: 400px;
  left: 50%;
  top: 30%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px #fff !important;
  border-radius: 8px;
}

.ai-message strong {
  color: #2c2c2c !important
}

.ai-message .message-content img {
  padding: 0px 0 !important;
  font-size: initial;
}

.message-content a {
  background-color: #5d3330;
  color: #fff !important;
  padding: 0px 10px;
  border-radius: 4px;
  display: inline-block;
  text-decoration: none !important;
  text-transform: uppercase;
  font-size: 13px;
  transition: all 0.3s ease;
  transform: translateX(3px);
}

.message-content a:hover {
  background-color: #5d3330 !important;
}

.message-content table th {
  color: #5d3330 !important
}

.message-content h4 {
  margin: 80px 0 20px 0 !important;
  line-height: 35px;
}

.message-content h4 {
  margin: 0 !important;
}

.message-content .margines {
  padding: 0 !important;
}

.message-content .szpalta {
  display: block;
  padding: 0px;
}

.message-content .pdf a {
  display: flex;
  width: 48% !important;
  padding: 5px 10px;
  margin-right: 5px;
  height: 50px;
  vertical-align: middle;
  justify-content: center;
  align-items: center;
}

.message-content .price-main span:last-child {
  font-size: 10px;
}

.message-content .pdf>div {
  margin: 50px 0;
}

.message-content .numermieszkania .numer {
  font-weight: bold;
  font-size: 47px;
  color: #a7aaaf;
  display: block;
  width: 100%;
  height: 50px;
  line-height: 50px;
}

.message-content .numermieszkania .numer2 {
  font-weight: bold;
  font-size: 47px;
  color: #5d3330;
  display: block;
  width: 100%;
  height: 50px;
  line-height: 50px;
}

.message-content .numermieszkania .podpis {
  font-size: 16px;
  color: #474747;
  text-transform: uppercase;
}

.message-content .numerki .numer {
  width: 20px;
  display: inline-block;
  height: 20px;
  border: 3px solid #5d3330;
  border-radius: 20px;
  text-align: center;
  line-height: 8px;
  text-align: center;
  padding: 3px;
  background-color: #5d3330;
  color: #fff;
  font-size: 13px;
}

.message-content .numerki .pomieszczenie {
  width: 250px;
  display: inline-block;

  color: #333;
  font-size: 14px;
}

.message-content .numerki .metraz {
  min-width: 80px;
  color: #414141;
  text-align: right;
  margin: 0 10px;
  display: inline-block;
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1.6;
}





.message-content .rzutmieszkania img {
  max-width: 100%;
  height: auto;
}

.message-content .wiersz .price-main {
  margin-top: 20px;
}

.message-content .price-main .opis {
  font-size: 16px;
  font-weight: bold;
}

.message-content .price-main .wartosc {
  font-size: 24px;
  font-weight: bold;
  color: #5d3330;
}

.message-content .price-main .podpis {
  font-size: 14px;
  color: #2c2c2c;
}

/* Pozycjonowanie absolutne dla przycisków - ZMIENIONE NA 2 KOLUMNY */
#aurelia-input-container,
#aurelia-dev-input-container {
  position: relative;
  width: 100%;
}

#aurelia-input,
#aurelia-dev-input {
  width: 100%;
  border-radius: 8px;
  padding: 12px 16px;
  resize: none;
  box-sizing: border-box;
  background: transparent;
}

#aurelia-send,
#aurelia-dev-send {
  background: #5d3330;
  color: #fff;
  border: none;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
}

#aurelia-send,
#aurelia-dev-send {
  background: #5d3330;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

p {
  margin: 0 0 15px;
  font-size: 17px;
  line-height: 24px;
}

#aurelia-quick-chips h4 {
  width: calc(100% - 170px);
  display: inline-block;
  margin-left: 30px;
}

#aurelia-quick-chips p {
  font-size: 13px;
  line-height: 19px;
  font-weight: 400;
  margin-bottom: 10px;
  color: #585656;
  margin-left: 100px
}

#aurelia-quick-chips .buttons-chip {
  margin-left: 100px
}

#aurelia-contact-human {
  background-color: #5d3330;
  color: #fff;
  padding: 15px 20px;
  font-weight: 600;
  width: max-content;
  font-size: 17px;
  border-radius: 2px;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0;
  max-width: 100%;
}

#aurelia-contact-human:hover {
  background-color: #7a4b48;
  color: #fff;
  text-decoration: none;
}

.aurelia-chip {
  margin: 4px 0px;
  background-color: #5d3330 !important;
  border-radius: 3px !important;

}

#aurelia-quick-chips h4,
#aurelia-quick-chips h4 {
  color: #333
}

#aurelia-quick-chips h4 strong {
  color: #5d3330;
}

#avatar {}

#avatar>span {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #cac8c6;
  box-shadow: 0 0 5px 3px #cac8c6;
  border-radius: 50%;
  z-index: 10;
}

#avatar>span img {
  filter: brightness(0.3);
}

/* Responsywność */
@media (max-width: 768px) {
  #aurelia-quick-chips {
    text-align: center;
  }

  #aurelia-quick-chips p {
    margin-left: 0px
  }

  #aurelia-quick-chips div {
    margin-left: 0px
  }

  #aurelia-quick-chips .buttons-chip {
    margin-left: 0;
  }

  #aurelia-quick-chips h4 {
    width: 100%;
    display: inline-block;
    margin-left: 0;
    font-size: 18px;
  }

  #avatar {
    display: block !important;
    width: max-content;
    margin: 0 auto !important;
  }

  #avatar>span {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #cac8c6;
    box-shadow: 0 0 5px 3px #cac8c6;
    border-radius: 50%;
    z-index: 10;
  }

  p {
    line-height: 22px !important;
    font-size: 14px !important;
  }

  #korzysci h4 {
    font-size
  }

  .desc-wrapper {
    font-size: 15px !important;
  }

  .message-content h4 {
    margin: 0px 0 20px 0 !important;
    line-height: 24px !important;
    font-size: 17px !important;
  }

  h5 {
    font-size: 16px !important;
    line-height: 21px !important;
  }

  .mcb-section-e8717d0cd h4 {
    font-size: 20px !important;
  }

  .mcb-section .mcb-wrap .mcb-item-600883583 .title {
    font-size: 20px;
  }

  .message-content .pdf a {
    display: flex;
    width: 100% !important;
    padding: 5px 10px;
    margin-right: 0;
    margin-top: 5px;
    height: 50px;
    vertical-align: middle;
    justify-content: center;
    align-items: center;
  }



  .ai-message .message-content ul {
    margin: 0 0 10px 15px;
    list-style: disc outside;
  }


  .fadeInDown,
  [data-anim-type=\"fadeInDown\"] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  #aurelia-container,
  #aurelia-dev-container {
    margin: 0px;
    border-radius: 8px;
  }

  .aurelia-message {
    max-width: 100%;
  }

  #aurelia-input-container,
  #aurelia-dev-input-container {
    padding: 15px 0;
    flex-direction: column;
    gap: 10px;
  }

  #aurelia-send,
  #aurelia-dev-send {
    align-self: stretch;
  }
}

/* Przycisk expand/collapse z ikonami SVG */
.aurelia-expand-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 10px auto;
  background: #5d3330;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(56, 88, 233, 0.3);
}

.aurelia-expand-toggle {
  background: #2a45c5;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(56, 88, 233, 0.5);
}

.aurelia-expand-toggle .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.aurelia-expand-toggle svg {
  display: block;
}

.aurelia-expand-toggle.rotating {
  animation: rotate180 0.3s ease;
}

@keyframes rotate180 {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(180deg);
  }
}

/* Highlight dla pytania użytkownika */
.user-message.highlight-question {
  animation: pulse 2s ease;
}

@keyframes pulse {

  0%,
  100% {
    background-color: transparent;
  }

  50% {
    background-color: rgba(56, 88, 233, 0.1);
  }
}

/* Input container - ZMIENIONE NA 2 KOLUMNY: textarea | przyciski pionowo */
#aurelia-input-container,
#aurelia-dev-input-container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px;
  padding: 8px;
  background: #a7aaaf;
  border: 1px solid #4b4995;
  border-radius: 8px;
  box-shadow: 0 0 20px #4b4985;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 20px 0 0 0;
}

/* Podświetlenie całego kontenera gdy textarea jest aktywne */
#aurelia-input-container.focused,
#aurelia-dev-input-container.focused {
  border-color: #5d3330;
  box-shadow: 0 0 20px #5d3330;
  background-color: #1f1e3f;
}

/* Textarea - rośnie do góry */
#aurelia-input,
#aurelia-dev-input {
  width: 100%;
  min-height: 24px;
  max-height: 200px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: #333;
  font-family: inherit;
  font-size: 15px;
  line-height: 24px;
  resize: none;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #5d3330 transparent;
  grid-column: 1;
  grid-row: 1;
}

#aurelia-input::-webkit-scrollbar,
#aurelia-dev-input::-webkit-scrollbar {
  width: 4px;
}

#aurelia-input::-webkit-scrollbar-track,
#aurelia-dev-input::-webkit-scrollbar-track {
  background: transparent;
}

#aurelia-input::-webkit-scrollbar-thumb,
#aurelia-dev-input::-webkit-scrollbar-thumb {
  background: #4b4995;
  border-radius: 2px;
}

/* Kontener dla przycisków - pionowy układ */
.aurelia-buttons-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: 2;
  grid-row: 1;
  align-self: flex-end;
}

/* Przyciski w kontenerze - mniejsze marginesy */
#aurelia-send,
#aurelia-dev-send {
  position: static;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  background: #5d3330;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}



#aurelia-send svg,
#aurelia-dev-send svg {
  display: block;
}

/* Przycisk expand/collapse w kontenerze - teraz w kolumnie przycisków */
.aurelia-expand-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  background: transparent !important;
  color: #5d3330;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.aurelia-expand-toggle {
  background: rgba(138, 71, 204, 0.2);
  color: #9d5dd8;
  transform: scale(1.05);
}

.aurelia-expand-toggle .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.aurelia-expand-toggle svg {
  display: block;
  transform: scale(0.7);
}

.aurelia-expand-toggle.rotating {
  animation: rotate180 0.3s ease;
}

@keyframes rotate180 {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(180deg);
  }
}

/* Responsywność */
@media (max-width: 768px) {

  #aurelia-input-container,
  #aurelia-dev-input-container {
    margin: 0;
    padding: 6px;
  }

  .user-message {
    margin: 0;
  }

  #aurelia-input,
  #aurelia-dev-input {
    font-size: 16px;
    min-height: 20px;
    /* Zapobiega auto-zoom na iOS */
  }
}

/* ========================================
AURELIA AI - ANIMATED STYLES
======================================== */
/* Przycisk rozwijania widoku */
.aurelia-expand-toggle {
  display: block;
  margin: 0 0 20px 0;
  padding: 0;
  background: transparent;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  position: relative;
  overflow: hidden;
  width: 32px;
  text-transform: uppercase;
  color: #999;
  font-weight: 300;
  letter-spacing: 1px;
  text-align: right;
}

.aurelia-expand-toggle::before {
  content: \'\';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.aurelia-expand-toggle:hover::before {
  width: 300px;
  height: 300px;
}

.aurelia-expand-toggle {
  transform: translateY(0);
}

/* Animacja przycisku */
.aurelia-expand-toggle.rotating {
  animation: rotateButton 0.3s ease-in-out;
}

@keyframes rotateButton {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(0deg) scale(1.1);
  }

  100% {
    transform: rotate(0deg) scale(1);
  }
}

/* Animacja pojawiania się wiadomości (już istniejąca, ulepszona) */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0) translateY(0px);
  }
}



/* Płynne przejście dla kontenera wiadomości */
#aurelia-messages {
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animacja dla przycisku wyślij */
#aurelia-send,
#aurelia-dev-send {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: static;
  overflow: hidden;
}

#aurelia-send::before,
#aurelia-dev-send::before {
  content: \'\';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

#aurelia-send:hover::before,
#aurelia-dev-send:hover::before {
  width: 200px;
  height: 200px;
}

#aurelia-send,
#aurelia-dev-send {
  transform: scale(0.95);
}

/* Animacja kropek / \"AI pisze...\" (ulepszona) */
.typing-dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.typing-dots i {
  width: 8px;
  height: 8px;
  background: #8a8a8a;
  border-radius: 50%;
  display: block;
  opacity: 0.4;
  animation: aureliaTyping 1.4s infinite ease-in-out;
}

.typing-dots i:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots i:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots i:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes aureliaTyping {

  0%,
  60%,
  100% {
    opacity: 0.4;
    transform: translateY(0) scale(1);
  }

  30% {
    opacity: 1;
    transform: translateY(-10px) scale(1.5);
    background-color: #5d3330;
  }
}

/* Animacja dla textarea przy focus */
#aurelia-input,
#aurelia-dev-input {
  transition: all 0.3s ease;
}

/* Shimmer effect dla nowych wiadomości AI */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.ai-message.new-message {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(138, 71, 204, 0.1) 50%,
      rgba(255, 255, 255, 0) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s ease-in-out 1;
}

/* Smooth scrollbar (tylko dla WebKit) */
#aurelia-messages::-webkit-scrollbar,
#aurelia-dev-messages::-webkit-scrollbar {
  width: 8px;
  transition: opacity 0.3s ease;
}

#aurelia-messages::-webkit-scrollbar-track,
#aurelia-dev-messages::-webkit-scrollbar-track {
  background: #161535;
  border-radius: 4px;
}

#aurelia-messages::-webkit-scrollbar-thumb,
#aurelia-dev-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4b4995 0%, #5d3330 100%);
  border-radius: 4px;
  transition: all 0.3s ease;
}

#aurelia-messages::-webkit-scrollbar-thumb,
#aurelia-dev-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5d3330 0%, #9370db 100%);
  box-shadow: 0 0 6px rgba(138, 71, 204, 0.5);
}

/* Animacja dla kontenera RODO */
#aurelia-consent-popup {
  animation: popupSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Hover effects dla linków w wiadomościach */
.message-content a {
  transition: all 0.3s ease;
}

.message-content a {
  transform: translateX(3px);
}

/* Responsywność dla animacji */
@media (max-width: 768px) {
  .aurelia-expand-toggle {
    padding: 0;
    font-size: 16px;
  }

  @keyframes pulseQuestion {

    0%,
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 rgba(75, 73, 149, 0);
    }

    50% {
      transform: scale(1.01);
      box-shadow: 0 0 15px rgba(75, 73, 149, 0.4);
    }
  }
}

/* Prefers-reduced-motion dla accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .aurelia-expand-toggle.rotating {
    animation: none;
  }

  .user-message.highlight-question {
    animation: none;
    box-shadow: 0 0 20px rgba(75, 73, 149, 0.5);
  }
}

/* ========== STYLE DLA MIKROFONU ========== */
#aurelia-voice-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 5px;
  margin-bottom: 20px;
  margin-top: 50px;
  z-index: 1;
  padding: 0;
}

#aurelia-voice-btn .voice-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 2;
  filter: brightness(0.3);
}

#aurelia-voice-btn:hover {
  background: #e0e0e000;
  color: #333;
}

#aurelia-voice-btn.listening {
  background: transparent;
  color: white;
}

#aurelia-voice-btn.waveform-recording {
  background: #ff6b6b;
  color: white;
  animation: backgroundPulse 1.5s infinite;
  box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
}

/* Podczas czekania na odpowiedź webhook - fioletowy kolor */
#aurelia-voice-btn.waveform-recognizing {
  background: #9b59b6;
  color: white;
  animation: backgroundPulsePurple 1.5s infinite;
  box-shadow: 0 0 0 0 rgba(155, 89, 182, 0.7);
}

#aurelia-voice-btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

/* Animacja pulsowania podczas nagrywania */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(255, 107, 107, 0);
  }
}

/* Animacja pulsowania tła z cieniem */
@keyframes backgroundPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 107, 107, 0);
  }
}

/* Animacja pulsowania dla stanu czekania (fioletowy kolor) */
@keyframes backgroundPulsePurple {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(155, 89, 182, 0.7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(155, 89, 182, 0);
  }
}

/* Status nagrywania */
#aurelia-voice-status {
  display: none;
  animation: slideIn 0.3s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wskaźnik nagrywania (rysujący się krąg) */
.recording-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #e74c3c;
  border-radius: 50%;
  margin-right: 8px;
  animation: blink 0.6s infinite;
}

/* Waveform Canvas Styles - HIDDEN */
#aurelia-waveform-canvas {
  display: none !important;
}

@keyframes fadeOutWave {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* ============================================
   AURELIA UNIVERSAL TABLES STYLES
   ============================================ */

/* Tabela */
.aurelia-data-table {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  z-index: 10;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.aurelia-data-table th,
.aurelia-data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

/* Nagłówki tabeli */
.aurelia-data-table thead th {
  background: #5d3330;
  color: white;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 11;
}

/* Sortowalne kolumny */
.aurelia-data-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.aurelia-data-table th.sortable:hover {
  background-color: #2d47c9;
}

/* Ikony sortowania */
.aurelia-data-table th.sortable::after {
  content: \' ⇅\';
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  margin-left: 4px;
  transition: color 0.2s ease;
}

.aurelia-data-table th.sortable.sort-asc::after {
  content: \' ↑\';
  color: #fff;
}

.aurelia-data-table th.sortable.sort-desc::after {
  content: \' ↓\';
  color: #fff;
}

/* Wiersze */
.aurelia-data-table tbody tr {
  transition: background-color 0.15s ease;
}

.aurelia-data-table tbody tr:hover {
  background-color: #f9f9f9;
}

.aurelia-data-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

/* Komórki */
.aurelia-data-table tbody td {
  vertical-align: middle;
  color: #333;
}

/* Checkboxy w tabelach */
.aurelia-data-table input[type=\"checkbox\"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin: 0;
}

.aurelia-data-table thead input[type=\"checkbox\"] {
  accent-color: white;
}

.aurelia-data-table tbody input[type=\"checkbox\"] {
  accent-color: #5d3330;
}

/* Toolbar / pasek narzędzi pod tabelą */
.aurelia-table-toolbar {
  background: #f9f9f9;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 4px 4px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.aurelia-table-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.aurelia-table-toolbar input[type=\"checkbox\"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #5d3330;
  margin: 0;
}

/* Przycisk usuwania */
.aurelia-table-toolbar [data-action=\"delete-selected\"] {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: none;
}

.aurelia-table-toolbar [data-action=\"delete-selected\"]:hover {
  background-color: #c82333;
  border-color: #bd2130;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.aurelia-table-toolbar [data-action=\"delete-selected\"]:active {
  transform: translateY(1px);
}

/* Licznik zaznaczonych */
.aurelia-table-toolbar .selected-count {
  font-weight: 600;
  color: #5d3330;
  font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .aurelia-data-table {
    font-size: 14px;
  }

  .aurelia-data-table th,
  .aurelia-data-table td {
    padding: 10px 8px;
  }

  .aurelia-table-toolbar {
    gap: 10px;
  }

  .aurelia-data-table th.sortable::after {
    font-size: 10px;
    margin-left: 2px;
  }
}

/* Modal Base */
#aurelia-contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 100px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.aurelia-modal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Form Styles */
.aurelia-modal-title {
  margin: 0 0 10px 0;
  color: #000;
}

.aurelia-modal-description {
  margin: 0 0 20px 0;
  color: #666;
  font-size: 14px;
}

.aurelia-form-group {
  margin-bottom: 15px;
}

.aurelia-form-group:last-of-type {
  margin-bottom: 20px;
}

.aurelia-form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.aurelia-form-input {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  background-color: #f8f8f8;
}

.aurelia-datetime-input {
  color: #000;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
}

.aurelia-form-hint {
  margin: 5px 0 0 0;
  color: #999;
  font-size: 12px;
}

/* Time Slots */
#aurelia-datetime-container {
  margin-bottom: 20px;
}

.aurelia-time-slots-container {
  display: none;
  margin-bottom: 20px;
}

.aurelia-time-slots-label {
  margin: 0 0 10px 0;
  color: #666;
  font-size: 13px;
  font-style: italic;
}

.aurelia-time-slots {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.aurelia-time-slots button {
  background-color: #fff;
  color: #bbb;
}

.aurelia-time-slots button:hover {
  background-color: #ffffff !important;
  border: 1px solid #3333338c !important;
  color: #333 !important;
}

.selected {
  background-color: #5d33303a !important;
}

.aurelia-liveplan-modal-close-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  background-color: transparent;
  width: 20px;
  height: 40px;
}

.aurelia-liveplan-modal-close-btn:hover {
  background-color: transparent;
}

.aurelia-modal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 2px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: absolute;
  z-index: 99999;
  margin: 0 auto;
}

.aurelia-form-input,
.aurelia-liveplan-modal-form input {
  width: 100% !important;
  background-color: rgb(255 255 255) !important;
  border: 1px solid #33333361 !important;
  color: #333333 !important;
  border-radius: 2px !important;
}

.aurelia-liveplan-modal-form input:focus {
  border: 1px solid #33333361;
  background-color: #fff;
  box-shadow: 0 0 5px #33333361;
  color: #1b1b1b;
}

/* Buttons */
.aurelia-modal-buttons {
  display: flex;
  gap: 10px;
}

.aurelia-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
  line-height: 25px;
}

.aurelia-btn-primary {
  background: #5d3330;
  color: white;
}

.aurelia-btn-primary:hover {
  background: #5d3330cc;
  color: #fff;
}

.aurelia-btn-secondary {
  background: #e9ecef;
  color: #000;
}

.aurelia-btn-secondary:hover {
  background: #d9dce3;
}

/* Loading State */
.aurelia-modal-loading,
.aurelia-contact-loading {
  display: none;
  text-align: center;
  margin-bottom: 20px;
  padding: 20px 0;
  border-top: 1px solid #eee;
}

.aurelia-loading-title {
  margin: 0 0 15px 0;
  color: #666;
  font-size: 14px;
}

.aurelia-typing-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  height: 30px;
  align-items: center;
}

.aurelia-typing-dot {
  background: #5d3330;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  animation: aurelia-typing 1.4s infinite;
}

.aurelia-typing-dot-delay-1 {
  animation-delay: 0.2s;
}

.aurelia-typing-dot-delay-2 {
  animation-delay: 0.4s;
}

/* Contact form loading overrides */
.aurelia-contact-loading {
  border-top: none;
}

.aurelia-contact-loading .aurelia-loading-title {
  color: #fff;
}

.aurelia-contact-loading .aurelia-typing-dot {
  background: #fff;
}

/* Success State */
.aurelia-modal-success {
  display: none;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #eee;
}

.aurelia-success-title {
  margin: 0 0 10px 0;
  color: #27ae60;
  font-size: 16px;
}

.aurelia-success-message {
  margin: 0 0 15px 0;
  color: #666;
  font-size: 13px;
  line-height: 1.6;
}

/* Chips */
.aurelia-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: #5d3330;
  color: #ffffff;
  cursor: pointer;
  min-width: 116px;
  font-size: 12px;
  transition: all 0.3s ease;
}

.aurelia-chip:hover {
  color: #fff;
}

.aurelia-chip:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Contact Button */
#aurelia-contact-human:hover {
  background: #635554;
}

/* Animations */
@keyframes aurelia-typing {

  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0px);
  }

  30% {
    opacity: 1;
    transform: translateY(-10px);
  }
}

.attachments a {
  padding: 8px 16px;
  background: #444;
  color: #fff !important;
  display: flex !important;
  align-items: center;
  text-align: center;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 50% !important;
  line-height: 17px;
}

.attachments a:hover {
  background: #252525;
  text-decoration: none;
  color: #fff !important;
}

#metadata .pomieszczenie {
  flex: 1;
  color: #333;
}

#metadata span {
  display: inline-block;
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1.6;
}

.message-content .mcb-wrap {
  display: block;
}

.message-content {
  counter-reset: item;
}

ol {
  list-style: none;
  padding-left: 0;
  width: 100%;
  display: inline-block;
  margin-left: 0;
  margin-top: 30px;
}

ol li {
  counter-increment: item;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-direction: row;
  flex-wrap: nowrap;
}

ol li::before {
  content: counter(item);
  min-width: 17px;
  height: 17px;
  background-color: #5d3330;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  line-height: 49px;
  margin-top: 5px;
}

button:hover {
  opacity: 0.6 !important;
}