/* Floating chat button */
.ai-chat-toggle {

    position: fixed;
    bottom: 10px;
    right: 20px;
    z-index: 2000000000 !important;
    height: 60px;
    background: #AA0039;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Zmiana z center na flex-start */
    padding: 0 16px;
    /* Dodaj padding */
    transition: all 0.3s ease;
    width: auto;
    /* Pozwól na automatyczną szerokość */
    min-width: 40px;
    /* Minimalna szerokość */
}

.ai-chat-toggle:hover {
    background: rgba(170, 0, 57, 0.80);
}


.ai-chat-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Odstęp między ikoną a tekstem */
    color: white;
    position: relative;
}

.ai-chat-icon img {
    width: 24px;
    height: 24px;
    border-radius: 24px;
    flex-shrink: 0;
    /* Ikona nie zmniejsza się */
}

.ai-chat-logo-welcome {
    border-radius: 50%;
}

.ai-chat-icon p {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    color: white;
    white-space: nowrap;
    /* Nie łam tekstu */
    font-family: "Poppins", Arial, sans-serif;
    font-weight: 600;
}

.ai-chat-icon p span {
    font-size: 12px;
    font-weight: 400;
}

.ai-chat-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ai-chat-toggle.minimized .close-icon {
    display: none;
}

.ai-chat-toggle.minimized img,
.ai-chat-toggle.minimized p {
    display: block;
}

/* Gdy chat otwarty (expanded) - pokaż X */
.ai-chat-toggle.expanded img,
.ai-chat-toggle.expanded p {
    display: none;
}

.ai-chat-toggle.expanded {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 60px;
    justify-content: center;
}

.ai-chat-toggle.expanded .close-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ai-window-all {
    position: fixed;
    bottom: 50px;
    /* 70px nad przyciskiem (60px + 30px margin) */
    right: 20px;
    /* taka sama pozycja jak przycisk */
    width: 380px;
    background: white;
    border-radius: 24px;
    box-shadow: 8px 8px 48px 0 rgba(0, 0, 0, 0.16);
    z-index: 2000000000 !important;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    padding: 24px;
}

.ai-chat-resize-handle {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 24px;
    height: 24px;
    background: url("/appFiles/themes/images/aiassistant/maximize-screen.svg") no-repeat center center;
    background-size: contain;
    border: none;
    cursor: pointer;
    z-index: 10;
}
.ai-chat-resize-handle::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.ai-chat-resize-handle:hover::after {
    opacity: 1;
    visibility: visible;
}
.resize-window .ai-chat-resize-handle {
    background-image: url("/appFiles/themes/images/aiassistant/minimize-screen.svg");
}


@media(min-width:768px) {
    #ai-window-all.resize-window {
        width: 70%;
    }
}

#ai-window-all.hidden {
    display: none !important;
}


.ai-assistant-chat {
    border: 1px solid #ddd;
    border-radius: 24px;
    /* max-width: 500px; */
    min-width: 320px;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    max-height: 800px;
    /* Maksymalna wysokość całego chatu */
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ai-assistant-chat.dark {
    border-color: #444;
    background-color: #2d2d2d;
    color: #fff;
}

.ai-chat-header {
    background: #FFF;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    flex-shrink: 0;
    text-align: center;
    object-fit: cover;
}

.ai-chat-header img {
    width: 72px;
}

/* .resize-window .ai-chat-header img {
    float: left;
    margin-right: 12px;
} */

.ai-chat-header h3 {
    color: #AA0039;
    text-align: center;
    font-family: "Poppins";
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
    margin-top: 5px;
}

.resize-window .ai-chat-header h3 {
    text-align: left;
}
.resize-window .ai-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    /* odstęp między ikoną a tekstem */
    margin-bottom: 5px;
}

.resize-window .ai-chat-header img {
    margin: 0;
    flex-shrink: 0;
    width: 60px;
}

.resize-window .ai-chat-header h3 {
    margin: 0;
    line-height: 1;
}

.ai-verification .ai-chat-header h3 {
    font-size: 18px;
}

.ai-chat-header h3.header-black {
    font-weight: 500;
    color: #2D3748;
}

.ai-chat-header h3 span {
    color: #202557;
    text-align: center;
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

.ai-chat-close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.ai-assistant-chat.dark .ai-chat-header {
    background: #333;
    border-color: #444;
    color: #fff;
}

.ai-chat-messages {
    border: 1.5px solid #E5E6EB;
    background: #F7F8FB;
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    min-height: 200px;
    max-height: 400px;
    border-radius: 16px;
    /* Maksymalna wysokość obszaru wiadomości */
    scroll-behavior: smooth;
    text-align: left !important;
    font-family: Arial, sans-serif !important;
}

.resize-window .ai-chat-messages {
    max-height: 500px;
}

.resize-window .ai-chat-disabled .ai-chat-messages {
    max-height: 450px;
}

.ai-chat-guest-info {
    width: 100%;
}

/* Dodatkowy reset dla głównych elementów tekstowych wewnątrz wiadomości */
.ai-chat-messages .ai-chat-message div,
.ai-chat-messages .ai-chat-message span,
.ai-chat-messages .ai-chat-message p,
.ai-chat-messages .ai-chat-message h1,
.ai-chat-messages .ai-chat-message h2,
.ai-chat-messages .ai-chat-message h3,
.ai-chat-messages .ai-chat-message h4,
.ai-chat-messages .ai-chat-message h5,
.ai-chat-messages .ai-chat-message h6,
.ai-chat-messages .ai-chat-message ul,
.ai-chat-messages .ai-chat-message ol,
.ai-chat-messages .ai-chat-message li,
.ai-chat-messages .ai-chat-message blockquote,
.ai-chat-messages .ai-chat-message pre,
.ai-chat-messages .ai-chat-message code {
    text-align: left !important;
}

/* Mocne resetowanie stylów dla wszystkich elementów w wiadomościach chatu */
.ai-chat-messages * {
    box-sizing: border-box !important;
}

/* Reset wszelkich globalnych stylów dla obszaru wiadomości */
.ai-chat-messages {
    text-align: left !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: inherit !important;
}

.ai-chat-messages * *,
.ai-chat-messages * *::before,
.ai-chat-messages * *::after {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: inherit !important;
    font: inherit !important;
    vertical-align: baseline !important;
    text-align: left !important;
    text-decoration: none !important;
    list-style: none !important;
    quotes: none !important;
    content: none !important;
}

.ai-chat-input-area {
    border-radius: 0 0 8px 8px;
    background: inherit;
    color: #202557;
    margin-top: 16px;

}

.ai-chat-input-area .char-counter {

    font-family: "Poppins";
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
    color: #686B8A;
    border-radius: 9999px;
    background: #F7F8FB;
    padding: 1px 5px;
    z-index: 10;
    pointer-events: none;
}

.ai-chat-input-area .char-counter.backround-red {
    color: #D60000;
    background: rgba(229, 1, 76, 0.10);
}

.ai-chat-input-area .textarea-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    order: 2;
    align-items: flex-end;
    flex-shrink: 0;
    border: 1px solid #ddd;
    border-radius: 16px;
    transition: border-color 0.2s ease;
    background: #fff;
    min-height: 60px;
    padding: 8px 12px;
}

.ai-assistant-chat.dark .ai-chat-input-area {
    border-color: #444;
}

.ai-chat-input-area .textarea-wrapper:focus-within {
    border-color: #007bff;
    /* lub inny kolor dla aktywnego stanu */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.textarea-bottom-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    justify-items: end;
    align-items: center;
    order: 2;
}

.ai-chat-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    resize: none;
    min-height: 50px;
    max-height: 80px;
    line-height: 1.4;
    box-sizing: border-box;
    padding: 0;
    font-family: inherit;
}
.resize-window .ai-chat-input {
    max-height: 120px;
}
.ai-assistant-chat.dark .ai-chat-input {
    background: #444;
    border-color: #555;
    color: #fff;
}

.ai-chat-send-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px;
}

.ai-chat-send-btn img {
    width: 40px;
    height: 40px;
}

.ai-chat-send-btn[disabled] {
    opacity: 0.5;
}

.ai-chat-message {
    margin-bottom: 12px !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    line-height: 1.5 !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
    text-align: left !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
}

.ai-chat-message.user {
    border-radius: 16px;
    background: #686B8A;
    color: #FFF;

    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    margin-left: 5% !important;
    margin-right: 35px !important;
}

.ai-chat-message.user::after {
    content: "";
    float: right;
    margin-left: 8px;
    width: 24px;
    height: 24px;
    background-image: url("/appFiles/themes/images/aiassistant/user_icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: -50px;
    border-radius: 25px;
    margin-top: -5px;
}

.ai-chat-message.assistant {
    border-radius: 16px;
    border: 1.5px solid #E5E6EB;
    background: #FFF;
    margin-right: 0% !important;
    margin-left: 20px !important;
    color: #202557;

    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
}

.ai-chat-message.assistant::before {
    content: "";
    float: left;
    margin-right: 8px;
    width: 24px;
    height: 24px;
    background-image: url("/appFiles/themes/images/aiassistant/lumen.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-left: -45px;
    border-radius: 25px;
}

.ai-assistant-chat.dark .ai-chat-message.assistant {
    background: #444;
    border-color: #555;
    color: #fff;
}

.ai-chat-message.loading {
    opacity: 0.7;
    font-style: italic;
}

.ai-chat-message.loading::after {
    content: '';
    animation: typing-dots 1.5s infinite;
}

@keyframes typing-dots {
    0% {
        content: '.';
    }

    25% {
        content: '..';
    }

    50% {
        content: '...';
    }

    75% {
        content: '...';
    }

    100% {
        content: '.';
    }
}

/* Style głównych list */
.ai-chat-messages .ai-chat-message ul,
.ai-chat-messages .ai-chat-message ol {
    margin: 8px 0 8px 0 !important;
    padding: 0 0 0 20px !important;
    list-style-position: outside !important;
    text-align: left !important;
    display: block !important;
}

.ai-chat-messages .ai-chat-message ul {
    list-style-type: disc !important;
    list-style: disc !important;
}

.ai-chat-messages .ai-chat-message ol {
    list-style-type: decimal !important;
    list-style: decimal !important;
}

.ai-chat-messages .ai-chat-message li {
    margin: 4px 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    display: list-item !important;
    text-align: left !important;
    color: inherit !important;
    font-size: inherit !important;
    list-style-type: inherit !important;
}

/* Resetowanie i własne style dla elementów HTML w wiadomościach */
.ai-chat-message h1,
.ai-chat-message h2,
.ai-chat-message h3,
.ai-chat-message h4,
.ai-chat-message h5,
.ai-chat-message h6 {
    margin: 12px 0 8px 0 !important;
    padding: 0 !important;
    font-weight: bold !important;
    font-family: inherit !important;
    color: inherit !important;
    text-align: left !important;
    line-height: 1.2 !important;
}

.ai-chat-message h1:first-child,
.ai-chat-message h2:first-child,
.ai-chat-message h3:first-child,
.ai-chat-message h4:first-child,
.ai-chat-message h5:first-child,
.ai-chat-message h6:first-child {
    margin-top: 0 !important;
}

.ai-chat-message h1 {
    font-size: 1.3em !important;
}

.ai-chat-message h2 {
    font-size: 1.2em !important;
}

.ai-chat-message h3 {
    font-size: 1.1em !important;
}

.ai-chat-message h4,
.ai-chat-message h5,
.ai-chat-message h6 {
    font-size: 1em !important;
}

.ai-chat-message strong,
.ai-chat-message b {
    font-weight: bold !important;
}

.ai-chat-message em,
.ai-chat-message i {
    font-style: italic !important;
}

.ai-chat-message p {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    text-align: left !important;
    font-size: inherit !important;
    color: inherit !important;
}

.ai-chat-message p:last-child {
    margin-bottom: 0 !important;
}

.ai-chat-message code {
    background: #f4f4f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.ai-assistant-chat.dark .ai-chat-message code {
    background: #3a3a3a;
    color: #fff;
}

.ai-chat-message pre {
    background: #f4f4f4;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
}

.ai-assistant-chat.dark .ai-chat-message pre {
    background: #3a3a3a;
    color: #fff;
}

.ai-chat-message pre code {
    background: none;
    padding: 0;
}


/* Zagnieżdżone listy */
.ai-chat-messages .ai-chat-message ul ul,
.ai-chat-messages .ai-chat-message ol ol,
.ai-chat-messages .ai-chat-message ul ol,
.ai-chat-messages .ai-chat-message ol ul {
    margin: 4px 0 !important;
    padding-left: 16px !important;
}

.ai-chat-messages .ai-chat-message ul ul {
    list-style-type: circle !important;
    list-style: circle !important;
}

.ai-chat-messages .ai-chat-message ul ul ul {
    list-style-type: square !important;
    list-style: square !important;
}

.ai-chat-message blockquote {
    border-left: 4px solid #ddd !important;
    padding: 0 0 0 12px !important;
    margin: 8px 0 !important;
    font-style: italic !important;
    color: #666 !important;
    text-align: left !important;
    background: none !important;
}

.ai-assistant-chat.dark .ai-chat-message blockquote {
    border-color: #555;
    color: #ccc;
}

.ai-chat-message hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 12px 0;
}

.ai-assistant-chat.dark .ai-chat-message hr {
    border-color: #555;
}

/* Styles for guest chat */
.ai-chat-guest-notice {
    color: #6B7280;
    margin-bottom: 16px;
    text-align: center;
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
}

.ai-verification .ai-chat-guest-notice {
    margin-bottom: 5px;
}

.ai-chat-disabled .ai-chat-guest-notice {
    display: none;
}

.ai-chat-guest.dark .ai-chat-guest-notice {
    color: #aaa;
}

.ai-chat-guest-info {
    border-radius: 16px;
    background: #EBEDF1;
    margin: 10px 0;
    color: var(--tekstowy-gwny-czarny-navy, #202557);
    text-align: center;
    font-family: "Poppins";
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
}

.ai-chat-guest.dark .ai-chat-guest-info {
    color: #aaa;
}

.ai-chat-guest-info p {
    margin: 0 10px;
    font-weight: 500;
    margin-bottom: 16px;
}

.ai-chat-guest-info a, .buttons-class a {
    border-radius: 9000px;
    padding: 10px 24px;
    background: var(--Czerwono-bordowy-z-logo-PO, #AA0039);
    justify-content: center;
    align-items: center;
    display: inline-block;
    color: var(--biel, #FFF);
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 26px;
    text-decoration: none;
    margin-bottom: 10px;
}
.buttons-class {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.buttons-class a {
   margin: 0
}
.ai-chat-guest-info h3 {
    color: var(--Czerwono-bordowy-z-logo-PO, #AA0039);
    text-align: center;
    font-family: "Poppins";
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 36px;
    margin: 0;
}

.ai-lead-confirmed .ai-chat-guest-info,
.ai-lead-confirmed-account .ai-chat-guest-info {
    padding: 24px 10px;
    background-color: #F7F8FB;
    ;
}

.ai-lead-confirmed .ai-chat-guest-info h3,
.ai-lead-confirmed-account .ai-chat-guest-info h3 {
    line-height: 24px;
}

.ai-chat-guest-info a:hover {
    text-decoration: underline;
}

.ai-chat-guest-info ul {
    text-align: left;
}

.ai-chat-guest-info ul li::before {
    content: url("/appFiles/site_8/other/images/akademia/icons/tick-circle.svg");
    position: absolute;
    left: -30px;
    /* Przesuń ikonę w lewo */
    width: 16px;
    height: 16px;
}


.ai-chat-guest-info ul li {
    list-style: none;
    list-style-type: none;
    position: relative;
    line-height: 24px;
}

.ai-chat-guest.dark .ai-chat-guest-info a {
    border-radius: 9000px;
    padding: 10px 24px;
    background: var(--Czerwono-bordowy-z-logo-PO, #AA0039);
    justify-content: center;
    align-items: center;

    color: var(--biel, #FFF);
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 26px;
}

.ai-chat-disabled {
    max-height: 750px !important;
}

@media(max-height: 750px) {
    .ai-chat-disabled {
        max-height: 650px !important;
    }

    .ai-chat-disabled .ai-chat-messages,
    .resize-window .ai-chat-disabled .ai-chat-messages {
        max-height: 240px;
    }

    #ai-window-all {
        padding: 16px;
    }

    .ai-chat-messages {
        max-height: 350px;
    }

    .resize-window .ai-chat-messages {
        max-height: 400px;
    }

}

.ai-chat-disabled .ai-chat-input {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.ai-assistant-chat .ai-chat-guest .ai-chat-guest-info {
    display: none;
}

.ai-chat-guest.ai-chat-disabled-guest .ai-chat-guest-info.guest {
    display: block;
    pointer-events: stroke;
}

.ai-chat-guest.ai-chat-disabled-to-logged .ai-chat-guest-info.to-logged {
    display: block;
    pointer-events: stroke;
}

.ai-chat-disabled .ai-chat-input-area {
    display: none;

}

.ai-chat-disabled .ai-chat-send-btn {
    background-color: #ccc;
    cursor: not-allowed;
}

.ai-chat-message code {
    background: #f4f4f4 !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 0.9em !important;
    color: #333 !important;
}

.ai-assistant-chat.dark .ai-chat-message code {
    background: #3a3a3a !important;
    color: #fff !important;
}

.ai-chat-message pre {
    background: #f4f4f4 !important;
    padding: 12px !important;
    border-radius: 4px !important;
    overflow-x: auto !important;
    margin: 8px 0 !important;
    font-family: 'Courier New', Courier, monospace !important;
}

.ai-assistant-chat.dark .ai-chat-message pre {
    background: #3a3a3a !important;
    color: #fff !important;
}

.ai-chat-message pre code {
    background: none !important;
    padding: 0 !important;
}

.ai-chat-message blockquote {
    border-left: 4px solid #ddd !important;
    padding-left: 12px !important;
    margin: 8px 0 !important;
    font-style: italic !important;
    color: #666 !important;
}

.ai-assistant-chat.dark .ai-chat-message blockquote {
    border-color: #555 !important;
    color: #ccc !important;
}

.ai-chat-message hr {
    border: none !important;
    border-top: 1px solid #ddd !important;
    margin: 12px 0 !important;
}

.ai-assistant-chat.dark .ai-chat-message hr {
    border-color: #555 !important;
}

/* Stylowanie scrollbara */
.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

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

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.ai-assistant-chat.dark .ai-chat-messages::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.ai-assistant-chat.dark .ai-chat-messages::-webkit-scrollbar-thumb {
    background: #555;
}

.ai-assistant-chat.dark .ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Responsywność dla mniejszych ekranów */
@media (max-width: 600px) {
    .ai-assistant-chat {
        max-width: 95%;
        min-width: 280px;
    }

    .ai-chat-message.user {
        margin-left: 10% !important;
    }

    .ai-chat-message.assistant {
        margin-right: 10% !important;
    }
}

/* Dodatkowe mocne resetowanie dla Bootstrap i innych frameworków */
.ai-chat-messages .ai-chat-message * {
    box-sizing: border-box !important;
    -webkit-box-sizing: border-box !important;
    -moz-box-sizing: border-box !important;
}

/* Napraw potencjalne problemy z Bootstrapem */
.ai-chat-messages .ai-chat-message p.text-center,
.ai-chat-messages .ai-chat-message div.text-center,
.ai-chat-messages .ai-chat-message span.text-center,
.ai-chat-messages .ai-chat-message h1.text-center,
.ai-chat-messages .ai-chat-message h2.text-center,
.ai-chat-messages .ai-chat-message h3.text-center,
.ai-chat-messages .ai-chat-message h4.text-center,
.ai-chat-messages .ai-chat-message h5.text-center,
.ai-chat-messages .ai-chat-message h6.text-center {
    text-align: left !important;
}

/* Upewnij się że wszystkie elementy blokowe wewnątrz wiadomości są wyrównane do lewej */
.ai-chat-messages .ai-chat-message>*,
.ai-chat-messages .ai-chat-message * {
    text-align: left !important;
    float: none !important;
}

/* Resetuj marginesy dla elementów wewnątrz wiadomości (ale nie dla samych wiadomości) */
.ai-chat-messages .ai-chat-message>*,
.ai-chat-messages .ai-chat-message>* * {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Wyjątki dla elementów inline */
.ai-chat-messages .ai-chat-message strong,
.ai-chat-messages .ai-chat-message b,
.ai-chat-messages .ai-chat-message em,
.ai-chat-messages .ai-chat-message i,
.ai-chat-messages .ai-chat-message code,
.ai-chat-messages .ai-chat-message span {
    display: inline !important;
}

/* Specjalne resetowanie dla list */
.ai-chat-messages .ai-chat-message ul,
.ai-chat-messages .ai-chat-message ol {
    display: block !important;
    list-style-position: outside !important;
}

.ai-chat-messages .ai-chat-message li {
    display: list-item !important;
    list-style-position: outside !important;
}

/* Reset margin/padding dla wszystkich elementów wewnątrz wiadomości */
.ai-chat-messages .ai-chat-message * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Przywróć marginesy tylko dla konkretnych elementów które ich potrzebują */
.ai-chat-messages .ai-chat-message p+p {
    margin-top: 8px !important;
}

.ai-chat-messages .ai-chat-message ul,
.ai-chat-messages .ai-chat-message ol {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}

.ai-chat-messages .ai-chat-message h1,
.ai-chat-messages .ai-chat-message h2,
.ai-chat-messages .ai-chat-message h3,
.ai-chat-messages .ai-chat-message h4,
.ai-chat-messages .ai-chat-message h5,
.ai-chat-messages .ai-chat-message h6 {
    margin-top: 12px !important;
    margin-bottom: 8px !important;
}

.ai-chat-messages .ai-chat-message h1:first-child,
.ai-chat-messages .ai-chat-message h2:first-child,
.ai-chat-messages .ai-chat-message h3:first-child,
.ai-chat-messages .ai-chat-message h4:first-child,
.ai-chat-messages .ai-chat-message h5:first-child,
.ai-chat-messages .ai-chat-message h6:first-child {
    margin-top: 0 !important;
}


.ai-chat-close-mobile {
    display: none;
}

/* welcome */
.ai-guest-notice {
    margin: 24px 10px;
    color: var(--Niebieski, #50BFEF);
    text-align: center;
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
}

.ai-welcome__intro {
    color: var(--tekstowy-gwny-czarny-navy, #202557);
    text-align: center;
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
}

.ai-steps--card {
    border-radius: 16px;
    background: var(--szaroc-do-kart-po, #F7F8FB);
    padding: 16px;
}

.ai-step {
    display: flex;

    gap: 16px;
    /* Odstęp między badge a content */
    margin-bottom: 16px;
    /* Odstęp między krokami */
}

.ai-step__badge {
    flex-shrink: 0;
    /* Badge nie zmniejsza się */
    order: 1;
    /* Badge po lewej */
    margin-top: 2px;


}

.ai-step__badge span {
    color: #FFF;
    font-family: "Poppins";
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    /* ZMIANA: z 36.772px na 1 */
    letter-spacing: 0.876px;

    /* Kółko */
    width: 24px;
    /* ZMIANA: zwiększ rozmiar */
    height: 24px;
    /* ZMIANA: zwiększ rozmiar */
    border-radius: 50%;
    /* ZMIANA: z 42.026px na 50% dla idealnego kółka */

    /* Wyśrodkowanie */
    display: flex;
    /* ZMIANA: z inline-block na flex */
    align-items: center;
    /* ZMIANA: dodaj wyśrodkowanie */
    justify-content: center;
    /* ZMIANA: dodaj wyśrodkowanie */

    /* Tło i cień */
    background: var(--cta-30, linear-gradient(32deg, rgba(119, 0, 40, 0.30) 14.87%, rgba(158, 0, 52, 0.30) 32.89%, rgba(242, 0, 80, 0.30) 86.49%));
    box-shadow: 7.004px 7.004px 56.034px 0 rgba(0, 0, 0, 0.08);
}

.ai-step__content {
    flex: 1;
    /* Content zajmuje resztę miejsca */
    order: 2;
    /* Content po prawej */
}

.ai-step__content .ai-step__title {
    color: var(--tekstowy-gwny-czarny-navy, #202557);
    font-family: "Poppins";
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
}

.ai-step__content .ai-step__desc {
    color: var(--tekstowy-uzuplniajcy-ciemna-szarosc-navye, #686B8A);
    font-family: "Poppins";
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
}

.ai-welcome__cta {
    margin-top: 16px;
    text-align: center;
}

.ai-welcome__cta:hover,
.ai-button.ai-button--primary:hover {
    opacity: 0.8;
}

.ai-button.ai-button--primary {
    border-radius: 9000px;
    background: var(--Czerwono-bordowy-z-logo-PO, #AA0039);
    padding: 10px 24px;
    color: var(--biel, #FFF);
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    border: none;
}

.ai-button.ai-button--primary :hover {
    opacity: 0.8;
}

.ai-verivication .ai-button.ai-button--primary {
    padding: 5px 24px;
}

/* form */
.ai-field {
    position: relative;
    margin-bottom: 16px;
    margin-top: 8px;
}

.ai-field__input {
    width: 100%;
    padding: 14px 12px 8px 12px;
    font-size: 14px;
    color: #232936;
    font-family: "Red Hat Display";
    border-radius: 12px;
    border: 1.5px solid var(--ciemniejszy-szary-facebookowy, #E5E6EB);
    background: #F7F8FB;
}

.ai-field__label {
    position: absolute;
    left: 12px;
    top: 16px;
    transition: 0.2s ease;
    pointer-events: none;

    color: #686B8A;
    font-family: "Red Hat Display";
    font-weight: 500;
}

/* animacja przy focus */
.ai-field__input:focus+.ai-field__label,
.ai-field__input:not(:placeholder-shown)+.ai-field__label {
    top: -8px;
    font-size: 12px;
    color: #686B8A;
    background-color: #F7F8FB;
    border-radius: 12px;
}

.ai-field__error,
.ai-consent__error,
.ai-sms__error,
.ai-terms__error,
.ai-recaptcha__error,
.ai-errors {
    color: #AA0039;
    font-size: 10px;
    margin-top: 2px;
    font-family: "Poppins";

}

.ai-errors {
    text-align: center;
    font-size: 14px;
}

.ai-field__input--error,
.no-icheck {
    border-color: #AA0039;
}

.ai-consent__error,
.ai-terms__error {
    margin-top: -5px;
}

.ai-sms__error {
    text-align: center;
}

.ai-consent,
.ai-terms {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 5px 0;
}

.ai-consent__wrapper,
.ai-terms__wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ai-consent__checkbox,
.ai-terms__checkbox {
    flex-shrink: 0;
    margin: 0;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: #AA0039;
    cursor: pointer;
}

.ai-consent__label,
.ai-terms__label {
    flex: 1;
    margin: 0;
    font-size: 10px;
    line-height: 15px;
    color: #6B7280;
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    cursor: pointer;
}

.ai-consent__label a,
.ai-terms__label a {
    color: #030303 !important;
    text-decoration: none;
}

.g-recaptcha {
    margin-left: 5px;
    margin-bottom: 10px;
}

.ai-actions__back,
.ai-actions__return {
    color: var(--Czerwono-bordowy-z-logo-PO, #AA0039);
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 26px;
    background: none;
    border: none;
    padding: 5px 12px;
}

.ai-actions--split {
    justify-content: space-between;
    display: flex;
}

/* sms */
.ai-sms-code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.ai-sms-code-inputs .code-input {
    width: 40px;
    height: 48px;
    border-radius: 8px;
    border: 1.5px solid #E5E6EB;
    background: #F7F8FB;
    text-align: center;
    font-size: 14px;
    font-family: "Poppins";
    font-weight: 500;
    color: #757693;
}

.ai-sms-verification__info {
    text-align: center;
    margin-bottom: 24px;
}

.ai-sms-verification__info a {
    text-align: center;
    color: #A03857 !important;
    font-family: "Poppins";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
}

.ai-sms-verification__info a::after {
    content: url("/appFiles/themes/images/aiassistant/refresh.svg");
    margin-left: 6px;
    vertical-align: middle;
}

.ai-sms-verification__info a:hover {
    opacity: 0.8;
}

/* recaptcha */

.ai-recaptcha .g-recaptcha>div {
    height: 70px !important;
}

.likeAnswer {
    text-align: right;
}

.likeAnswer button {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 12px !important;
}

.likeAnswer button .ai-feedback-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.likeAnswer button .ai-feedback-icon--active {
    display: none;
}

.likeAnswer button.active .ai-feedback-icon--default {
    display: none;
}

.likeAnswer button.active .ai-feedback-icon--active {
    display: inline-block;
}

.likeAnswer button:hover {
    opacity: 0.7;
}

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

@media(max-width: 767px) {
    #ai-chat-resize-handle {
        display: none;
    }

    #ai-window-all {
        width: 100%;
        position: fixed;
        right: 0;
        bottom: 0;
        max-width: 100%;
        z-index: 1001;
        margin-left: 5px;
    }

    .ai-chat-close-mobile {
        position: absolute;
        top: 24px;
        right: 24px;
        width: 32px;
        height: 32px;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        font-weight: bold;
        color: #AA0039;
        cursor: pointer;
        z-index: 1002;
        background: none;
    }

    .ai-chat-messages {
        flex: 1 !important;
        overflow-y: auto !important;
        height: 350px !important;
    }

    .ai-actions__back,
    .ai-actions__return {
        font-size: 0;
    }

    .ai-actions__back::after,
    .ai-actions__return::after {
        font-size: 12px;

    }

    .ai-verification .ai-chat-header h3 {
        font-size: 16px;
    }

    .ai-chat-guest-notice {
        font-size: 12px;
    }

    .ai-field__input {
        font-size: 12px;
        padding: 9px 0 10px 16px
    }

    .ai-field__label {
        font-size: 12px;
    }

    .ai-chat-header img {
        width: 100px;
    }

    .ai-welcome .ai-chat-header img {
        height: 100px;
    }
}
