/*!**********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[7].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[7].use[3]!./components/Chat.module.css ***!
  \**********************************************************************************************************************************************************************************************************************************************************************/
.Chat_container__JpLNl {
  width: 100%;
  max-width: 800px;
  height: 90vh;
  max-height: 800px;
  display: flex;
  flex-direction: column;
}

.Chat_chatBox__GSuRZ {
  background: #0f1932;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(15, 25, 50, 0.3);
  border: 1px solid rgba(30, 50, 100, 0.5);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.Chat_header__yxiWb {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(30, 50, 100, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a2540;
  color: rgba(255, 255, 255, 0.9);
}

.Chat_header__yxiWb h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1px;
}

.Chat_status__9nwyJ {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.Chat_statusDot__hNj8k {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.Chat_statusDot__hNj8k.Chat_connected__AVdqt {
  background-color: rgba(100, 150, 255, 0.8);
  box-shadow: 0 0 8px rgba(100, 150, 255, 0.6), 0 0 16px rgba(100, 150, 255, 0.3);
}

.Chat_statusDot__hNj8k.Chat_disconnected__LP5Un {
  background-color: #ef4444;
}

.Chat_messages__JhY9K {
  flex: 1 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #0f1932;
  overflow-anchor: none;
  min-height: 0; /* Prevent flex item from overflowing parent */
}

.Chat_messages__JhY9K::-webkit-scrollbar {
  width: 6px;
}

.Chat_messages__JhY9K::-webkit-scrollbar-track {
  background: #0f1932;
}

.Chat_messages__JhY9K::-webkit-scrollbar-thumb {
  background: rgba(30, 50, 100, 0.5);
  border-radius: 3px;
}

.Chat_messages__JhY9K::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 50, 100, 0.7);
}

.Chat_welcome___dh1f {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 20px;
}

.Chat_welcome___dh1f p {
  font-size: 16px;
}

.Chat_message__YX51t {
  display: flex;
  margin-bottom: 8px;
  animation: Chat_fadeIn__MCOf9 0.3s ease-in;
}

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

.Chat_message__YX51t.Chat_user__v_1_q {
  justify-content: flex-end;
}

.Chat_message__YX51t.Chat_assistant__XIxtf {
  justify-content: flex-start;
}

.Chat_messageContent__lPbe_ {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  word-wrap: break-word;
  line-height: 1.6;
}

.Chat_messageContent__lPbe_ p {
  margin: 0 0 8px 0;
}

.Chat_messageContent__lPbe_ p:last-child {
  margin-bottom: 0;
}

.Chat_messageContent__lPbe_ ul,
.Chat_messageContent__lPbe_ ol {
  margin: 8px 0;
  padding-left: 20px;
}

.Chat_messageContent__lPbe_ li {
  margin: 4px 0;
}

.Chat_messageContent__lPbe_ code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.Chat_messageContent__lPbe_ pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
}

.Chat_messageContent__lPbe_ pre code {
  background: none;
  padding: 0;
}

.Chat_messageContent__lPbe_ h1,
.Chat_messageContent__lPbe_ h2,
.Chat_messageContent__lPbe_ h3,
.Chat_messageContent__lPbe_ h4,
.Chat_messageContent__lPbe_ h5,
.Chat_messageContent__lPbe_ h6 {
  margin: 12px 0 8px 0;
  font-weight: 600;
}

.Chat_messageContent__lPbe_ h1 { font-size: 1.5em; }
.Chat_messageContent__lPbe_ h2 { font-size: 1.3em; }
.Chat_messageContent__lPbe_ h3 { font-size: 1.1em; }

.Chat_messageContent__lPbe_ a {
  color: rgba(150, 180, 255, 0.9);
  text-decoration: underline;
}

.Chat_messageContent__lPbe_ a:hover {
  color: rgba(170, 200, 255, 1);
}

.Chat_messageContent__lPbe_ blockquote {
  border-left: 3px solid rgba(30, 50, 100, 0.6);
  padding-left: 12px;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.75);
}

.Chat_messageContent__lPbe_ table {
  border-collapse: collapse;
  margin: 8px 0;
  width: 100%;
}

.Chat_messageContent__lPbe_ th,
.Chat_messageContent__lPbe_ td {
  border: 1px solid rgba(30, 50, 100, 0.4);
  padding: 8px;
  text-align: left;
}

.Chat_messageContent__lPbe_ th {
  background: rgba(15, 25, 50, 0.6);
}

.Chat_loading__hCHr8 {
  display: inline-block;
  animation: Chat_pulse__Qxg0K 1.5s ease-in-out infinite;
}

@keyframes Chat_pulse__Qxg0K {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.Chat_message__YX51t.Chat_user__v_1_q .Chat_messageContent__lPbe_ {
  background: #1a2540;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 50, 100, 0.5);
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.Chat_message__YX51t.Chat_assistant__XIxtf .Chat_messageContent__lPbe_ {
  background: rgba(15, 25, 50, 0.5);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(30, 50, 100, 0.4);
  border-bottom-left-radius: 4px;
}

.Chat_message__YX51t.Chat_assistant__XIxtf .Chat_messageContent__lPbe_ code {
  background: rgba(0, 0, 0, 0.5);
  color: rgba(150, 180, 255, 0.9);
}

.Chat_message__YX51t.Chat_assistant__XIxtf .Chat_messageContent__lPbe_ pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(30, 50, 100, 0.4);
}

.Chat_message__YX51t.Chat_assistant__XIxtf .Chat_messageContent__lPbe_ a {
  color: rgba(150, 180, 255, 0.9);
}

.Chat_message__YX51t.Chat_assistant__XIxtf .Chat_messageContent__lPbe_ a:hover {
  color: rgba(170, 200, 255, 1);
}

.Chat_inputArea__aDzaw {
  padding: 20px 24px;
  border-top: 1px solid rgba(30, 50, 100, 0.5);
  display: flex;
  gap: 12px;
  background: #0f1932;
}

.Chat_input__w8uk_ {
  flex: 1 1;
  padding: 12px 16px;
  border: 1px solid rgba(30, 50, 100, 0.5);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: rgba(15, 25, 50, 0.6);
  color: rgba(255, 255, 255, 0.9);
}

.Chat_input__w8uk_:focus {
  border-color: rgba(30, 50, 100, 0.8);
  box-shadow: 0 0 8px rgba(30, 50, 100, 0.4);
}

.Chat_input__w8uk_::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.Chat_input__w8uk_:disabled {
  background-color: rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
  opacity: 0.5;
}

.Chat_sendButton__Ysouy {
  padding: 12px 24px;
  background: #1a2540;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 50, 100, 0.5);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s, background 0.2s;
  min-width: 80px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.Chat_sendButton__Ysouy:hover:not(:disabled) {
  background: rgba(26, 37, 64, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.Chat_sendButton__Ysouy:active:not(:disabled) {
  transform: translateY(0);
}

.Chat_sendButton__Ysouy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .Chat_container__JpLNl {
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  
  .Chat_chatBox__GSuRZ {
    border-radius: 0;
  }
  
  .Chat_messageContent__lPbe_ {
    max-width: 85%;
  }
}

/* Widget mode styles */
.Chat_container__JpLNl.Chat_widgetMode__eBGX9 {
  max-width: 100%;
  height: 100%;
  max-height: 100%;
}

.Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_chatBox__GSuRZ {
  border-radius: 0;
  box-shadow: none;
  border: none;
  height: 100%;
}

.Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_messages__JhY9K {
  padding: 16px;
  gap: 12px;
}

.Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_messageContent__lPbe_ {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 14px;
}

.Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_welcome___dh1f {
  padding: 20px 16px;
}

.Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_welcome___dh1f p {
  font-size: 14px;
}

@media (max-width: 768px) {
  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 {
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    /* Usunięto position: fixed, left: 0, bottom: 0 ponieważ to powodowało, że chat był zawsze widoczny */
    /* Chat jest wewnątrz .chatPanel, który zarządza pozycjonowaniem i animacją */
  }
  
  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_chatBox__GSuRZ {
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  
  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_messages__JhY9K {
    flex: 1 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 16px !important;
    /* Dodaj padding na dole, aby treść nie chowała się pod inputem */
    padding-bottom: 40px !important;
    overflow-anchor: none !important;
  }

  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_inputArea__aDzaw {
    flex-shrink: 0 !important;
    padding: 12px 16px !important;
    display: flex !important;
    width: 100% !important;
    background: #0f1932; /* Upewnij się, że tło jest nieprzezroczyste */
    z-index: 10; /* Upewnij się, że jest nad treścią */
    /* Bezpieczny margines na dole dla iPhone'ów bez przycisku Home */
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
  
  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_message__YX51t {
    display: flex !important;
    flex-shrink: 0 !important;
  }
  
  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_messageContent__lPbe_ {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_welcome___dh1f {
    display: block !important;
    visibility: visible !important;
  }
  
  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_input__w8uk_ {
    font-size: 16px; /* Zapobiega zoom na iOS */
    min-height: 44px;
  }
  
  .Chat_container__JpLNl.Chat_widgetMode__eBGX9 .Chat_sendButton__Ysouy {
    min-width: 60px;
    padding: 12px 16px;
  }
}


/*!********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[7].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[7].use[3]!./app/demo/demo.module.css ***!
  \********************************************************************************************************************************************************************************************************************************************************************/
.demo_demoContainer__RBCyc {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.demo_iframe__yVZQa {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.demo_bottomInputContainer__gV1cs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: rgba(15, 25, 50, 0.7);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: background 0.3s ease, opacity 0.3s ease, -webkit-backdrop-filter 0.3s ease;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, opacity 0.3s ease;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, opacity 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

.demo_bottomInputContainer__gV1cs.demo_focused__GRSDa {
  background: rgba(15, 25, 50, 0.95);
  -webkit-backdrop-filter: blur(15px);
          backdrop-filter: blur(15px);
}

.demo_inputForm__glJSE {
  display: flex;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

.demo_bottomInput__XIyFS {
  flex: 1 1;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s, opacity 0.3s;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.8;
}

.demo_bottomInput__XIyFS::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.demo_bottomInput__XIyFS:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.25);
  opacity: 1;
}


.demo_sendButton__x1Jlf {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s, opacity 0.3s;
  flex-shrink: 0;
  opacity: 0.8;
}

.demo_sendButton__x1Jlf:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.demo_sendButton__x1Jlf:active:not(:disabled) {
  transform: scale(0.95);
}

.demo_sendButton__x1Jlf:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.demo_chatPanel__F_xb7 {
  position: fixed;
  top: 0;
  right: -25vw; /* Ukryty poza ekranem (25% szerokości) */
  width: 25vw;
  height: 100vh;
  background: #0f1932;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.7);
  z-index: 1001;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(30, 50, 100, 0.5);
}

.demo_chatPanel__F_xb7.demo_open__8Z6Wz {
  right: 0; /* Wysunięty na ekran */
}

.demo_chatHeader___waI8 {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(30, 50, 100, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a2540;
  color: rgba(255, 255, 255, 0.9);
}

.demo_chatHeader___waI8 h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.demo_closeButton__JPldW {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.demo_closeButton__JPldW:hover {
  background: rgba(255, 255, 255, 0.3);
}

.demo_chatContent__ny5h8 {
  flex: 1 1;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: 0; /* Ważne dla flexbox */
  position: relative;
}

.demo_chatContent__ny5h8 > div {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 768px) {
  .demo_chatContent__ny5h8 {
    height: calc(100dvh - 60px); /* Wysokość minus header */
    min-height: 0;
  }
  
  .demo_chatContent__ny5h8 > div {
    height: 100% !important;
    max-height: 100% !important;
  }
}

@media (max-width: 768px) {
  .demo_chatPanel__F_xb7 {
    width: 100vw;
    right: -100vw;
    height: 100dvh;
    max-height: 100dvh;
  }
  
  .demo_chatPanel__F_xb7.demo_open__8Z6Wz {
    right: 0;
  }
  
  .demo_chatHeader___waI8 {
    flex-shrink: 0;
    min-height: 60px;
  }
  
  .demo_chatContent__ny5h8 {
    height: calc(100dvh - 60px);
    min-height: calc(100dvh - 60px);
    max-height: calc(100dvh - 60px);
  }
  
  .demo_inputForm__glJSE {
    padding: 0;
  }
  
  .demo_bottomInput__XIyFS {
    font-size: 14px;
    padding: 12px 16px;
  }
  
  .demo_sendButton__x1Jlf {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .demo_chatPanel__F_xb7 {
    width: 25vw;
    right: -25vw;
  }
}


