/* === STYLE CHATBOTA === */

/* Kontener floating chatbota */
.ai-input-container-floating {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 700px;
    z-index: 15;
}

.ai-top-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 90%;
    max-width: 800px;
    border-radius: 10px !important;
}

/* Style dla homepageCarousel - padding dla pływającego czatu */
#homepageCarousel {
    position: relative;
    padding-top: 100px;
    padding-bottom: 50px;
}

/* Wrapper inputu i chatbota */
.ai-input-wrapper {
    transition: all 0.4s ease-out;
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 10px !important;
}

/* Header chatbota */
.ai-chat-header {
    cursor: pointer;
    background-color: #f8f9fa !important;
}

/* Tekst "Asystent AI" w rozwiniętym stanie */
#ai-assistant-text {
    display: none;
    font-weight: 600;
    color: #0d6efd;
    font-size: 1rem;
    text-align: center;
    flex-grow: 1;
    line-height: 1.5;
    padding: 0.5rem 1rem;
}

/* Input triggera */
.ai-glow-input {
    transition: box-shadow 0.3s ease-in-out;
    height: auto;
    padding: 0.5rem 1rem;
    box-shadow: none !important;
    background: transparent;
}

.ai-glow-input:focus {
    box-shadow: none;
    border-color: transparent;
    outline: 0;
}

/* Przycisk wysyłania w nagłówku */
#ai-trigger-send-button {
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    font-size: 0.875rem;
    min-width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
}

#ai-trigger-send-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

#ai-trigger-send-button:active {
    transform: translateY(0);
}

#ai-trigger-send-button i {
    font-size: 0.875rem;
}

/* Przycisk NOWY w nagłówku głównego chatu */
/* #ai-chat-new-button {
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    font-size: 0.75rem;
    min-width: 45px;
    height: 28px;
    display: none; 
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-color: #198754;
    color: #198754;
} */

/* #ai-chat-new-button:hover {
    transform: translateY(-1px);
    background-color: #198754;
    color: white;
    box-shadow: 0 3px 6px rgba(25, 135, 84, 0.3);
} */

#ai-chat-new-button:active {
    transform: translateY(0);
}

/* Ciało chatbota - domyślnie zwinięte */
.ai-chat-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

/* Stan rozwinięty */
.ai-input-wrapper.expanded {
    border-color: #0d6efd;
}

.ai-input-wrapper.expanded .ai-chat-body {
    max-height: 450px;
}

.ai-input-wrapper.expanded #ai-chat-close-button {
    display: inline-block;
}

/* Zaawansowana animacja AI z gradientową granicą */
.ai-icon-container {
    position: relative;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-siri-orb {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    border: 1px solid rgba(100, 100, 100, 0.4);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 3px 3px rgba(255, 255, 255, 0.9), 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 15;
}

/* Białe szklane ramki */
.ai-siri-orb::before {
    content: '';
    position: absolute;
    width: 37px;
    height: 37px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 4px 4px rgba(78, 78, 78, 0.1), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ai-siri-orb::after {
    content: '';
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    z-index: 10;
    pointer-events: none;
}

/* Ikona KCZ AI w środku */
.ai-siri-orb .ai-inner-glow {
    position: relative;
    width: 26px;
    height: 26px;
    background: url('/imgs/kcz_ai.png') no-repeat center center;
    background-size: contain;
    z-index: 3;
}

/* Animowane kolorowe chmury pod ikoną */
.ai-siri-orb .ai-blob-1,
.ai-siri-orb .ai-blob-2,
.ai-siri-orb .ai-blob-3,
.ai-siri-orb .ai-blob-4,
.ai-siri-orb .ai-blob-5 {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    z-index: 0;
    mix-blend-mode: multiply;
}



.ai-siri-orb .ai-blob-1 {
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, rgba(255, 20, 147, 1) 0%, rgba(255, 107, 157, 0.6) 70%);
    top: 30%;
    left: 25%;
    animation: aiBlobFloat1 6.3s ease-in-out infinite;
}

.ai-siri-orb .ai-blob-2 {
    width: 17px;
    height: 17px;
    background: radial-gradient(circle, rgba(30, 144, 255, 1) 0%, rgba(84, 160, 255, 0.6) 70%);
    top: 50%;
    right: 20%;
    animation: aiBlobFloat2 7.2s ease-in-out infinite reverse;
}

.ai-siri-orb .ai-blob-3 {
    width: 13px;
    height: 13px;
    background: radial-gradient(circle, rgba(255, 165, 0, 1) 0%, rgba(248, 181, 0, 0.6) 70%);
    bottom: 25%;
    left: 30%;
    animation: aiBlobFloat3 5.8s ease-in-out infinite;
}

.ai-siri-orb .ai-blob-4 {
    width: 11px;
    height: 11px;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.9) 0%, rgba(139, 69, 19, 0.5) 70%);
    top: 60%;
    left: 60%;
    transform: translate(-50%, -50%);
    animation: aiBlobFloat4 8.5s ease-in-out infinite;
}

.ai-siri-orb .ai-blob-5 {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, rgba(138, 43, 226, 1) 0%, rgba(95, 39, 205, 0.6) 70%);
    bottom: 40%;
    right: 25%;
    animation: aiBlobFloat5 6.7s ease-in-out infinite reverse;
}

.ai-floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

.ai-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 0, 110, 0.6);
    border-radius: 50%;
    animation: particleFloat 4s linear infinite;
}

.ai-particle:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
    background: rgba(138, 56, 236, 0.6);
}

.ai-particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 1s;
    background: rgba(58, 134, 255, 0.6);
}

.ai-particle:nth-child(3) {
    top: 80%;
    left: 30%;
    animation-delay: 2s;
    background: rgba(6, 255, 165, 0.6);
}

.ai-particle:nth-child(4) {
    top: 30%;
    left: 70%;
    animation-delay: 3s;
    background: rgba(255, 190, 11, 0.6);
}

/* Active efekt - gdy chat jest otwarty */
.ai-chat-header.active .ai-siri-orb {
    transform: scale(1.05);
    box-shadow: 0 0 5px 5px rgba(255, 255, 255, 1), 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ai-chat-header.active .ai-siri-orb .ai-blob-1 {
    animation-duration: 3s;
    filter: blur(6px);
}

.ai-chat-header.active .ai-siri-orb .ai-blob-2 {
    animation-duration: 3.5s;
    filter: blur(6px);
}

.ai-chat-header.active .ai-siri-orb .ai-blob-3 {
    animation-duration: 2.5s;
    filter: blur(6px);
}

.ai-chat-header.active .ai-siri-orb .ai-blob-4 {
    animation-duration: 4s;
    filter: blur(6px);
}

.ai-chat-header.active .ai-siri-orb .ai-blob-5 {
    animation-duration: 3.2s;
    filter: blur(6px);
}

/* Wykluczenie efektów filter w trybie negatywu dla aktywnych elementów AI */
body.wcag-negative .ai-chat-header.active .ai-siri-orb .ai-blob-1,
body.wcag-negative .ai-chat-header.active .ai-siri-orb .ai-blob-2,
body.wcag-negative .ai-chat-header.active .ai-siri-orb .ai-blob-3,
body.wcag-negative .ai-chat-header.active .ai-siri-orb .ai-blob-4,
body.wcag-negative .ai-chat-header.active .ai-siri-orb .ai-blob-5 {
    filter: none !important;
}

.ai-chat-header.active .ai-particle {
    animation-duration: 2s;
}

/* Animacje dla KCZ AI blob-ów */

@keyframes aiBlobFloat1 {
    0% {
        transform: translate(0, 0) scale(1, 1);
        opacity: 0.8;
    }
    15% {
        transform: translate(7px, -2px) scale(1.3, 0.7) skew(5deg);
        opacity: 0.9;
    }
    35% {
        transform: translate(-4px, 8px) scale(0.8, 1.4) skew(-8deg);
        opacity: 0.6;
    }
    55% {
        transform: translate(9px, 1px) scale(1.1, 0.9) skew(3deg);
        opacity: 0.9;
    }
    75% {
        transform: translate(-6px, -5px) scale(0.6, 1.6) skew(-12deg);
        opacity: 0.7;
    }
    90% {
        transform: translate(3px, 6px) scale(1.2, 0.8) skew(7deg);
        opacity: 0.8;
    }
    100% {
        transform: translate(0, 0) scale(1, 1);
        opacity: 0.8;
    }
}

@keyframes aiBlobFloat2 {
    0% {
        transform: translate(0, 0) scale(1, 1);
        opacity: 0.9;
    }
    12% {
        transform: translate(-8px, 3px) scale(1.2, 0.6) skew(-10deg);
        opacity: 0.7;
    }
    28% {
        transform: translate(5px, -7px) scale(0.7, 1.3) skew(6deg);
        opacity: 0.9;
    }
    45% {
        transform: translate(-3px, 9px) scale(1.6, 0.5) skew(-15deg);
        opacity: 0.5;
    }
    62% {
        transform: translate(10px, -2px) scale(0.8, 1.4) skew(9deg);
        opacity: 0.8;
    }
    85% {
        transform: translate(-7px, -8px) scale(1.3, 0.8) skew(-5deg);
        opacity: 0.6;
    }
    100% {
        transform: translate(0, 0) scale(1, 1);
        opacity: 0.9;
    }
}

@keyframes aiBlobFloat3 {
    0% {
        transform: translate(0, 0) scale(1, 1);
        opacity: 0.7;
    }
    18% {
        transform: translate(-8px, -3px) scale(0.6, 1.5) skew(12deg);
        opacity: 0.9;
    }
    38% {
        transform: translate(6px, 7px) scale(1.3, 0.6) skew(-8deg);
        opacity: 0.6;
    }
    58% {
        transform: translate(-2px, -9px) scale(1.2, 0.9) skew(4deg);
        opacity: 0.8;
    }
    78% {
        transform: translate(9px, 4px) scale(0.7, 1.4) skew(-11deg);
        opacity: 0.9;
    }
    100% {
        transform: translate(0, 0) scale(1, 1);
        opacity: 0.7;
    }
}

@keyframes aiBlobFloat4 {
    0% {
        transform: translate(-50%, -50%) scale(1, 1);
        opacity: 0.6;
    }
    22% {
        transform: translate(-58%, -43%) scale(1.6, 0.7) skew(-13deg);
        opacity: 0.9;
    }
    40% {
        transform: translate(-42%, -57%) scale(0.7, 1.3) skew(8deg);
        opacity: 0.7;
    }
    65% {
        transform: translate(-54%, -46%) scale(1.4, 0.6) skew(-6deg);
        opacity: 0.5;
    }
    88% {
        transform: translate(-46%, -54%) scale(0.8, 1.5) skew(10deg);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1, 1);
        opacity: 0.6;
    }
}

@keyframes aiBlobFloat5 {
    0% {
        transform: translate(0, 0) scale(1, 1);
        opacity: 0.8;
    }
    14% {
        transform: translate(8px, -9px) scale(1.3, 0.8) skew(7deg);
        opacity: 0.6;
    }
    32% {
        transform: translate(-7px, 5px) scale(0.6, 1.6) skew(-14deg);
        opacity: 0.9;
    }
    50% {
        transform: translate(4px, 8px) scale(1.4, 0.5) skew(11deg);
        opacity: 0.7;
    }
    71% {
        transform: translate(-9px, -3px) scale(0.8, 1.4) skew(-9deg);
        opacity: 0.8;
    }
    94% {
        transform: translate(6px, -6px) scale(1.1, 0.9) skew(5deg);
        opacity: 0.6;
    }
    100% {
        transform: translate(0, 0) scale(1, 1);
        opacity: 0.8;
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(-2px) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(-8px) scale(1.2);
    }
    100% {
        transform: translateY(-10px) scale(0);
        opacity: 0;
    }
}

/* Obszar wiadomości */
#chat-messages {
    overflow-y: auto;
    background-color: #f8f9fa;
    height: 300px;
}

#ai-chat-body .chat-input-area {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Input w chacie na stronie głównej - subtelne zaokrąglenia */
#ai-chat-body #chat-input {
    border-radius: 8px 0 0 8px;
    border: 1px solid #acd6ff;
    padding: 0.75rem 1rem;
    border-right: none;
}

#ai-chat-body #chat-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    border-color: #0d6efd;
    z-index: 2;
}

#ai-chat-body #chat-send-button {
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    border: 1px solid #0d6efd;
}

/* Podstawowe style wiadomości */
#ai-chat-body .chat-message { 
    margin-bottom: 10px; 
    padding: 8px 12px; 
    border-radius: 15px; 
    max-width: 80%; 
    word-wrap: break-word; 
    font-size: 0.85em;
}

#ai-chat-body .chat-message.user { 
    background-color: #0d6efd !important; 
    color: white; 
    margin-left: auto; 
    border-bottom-right-radius: 1px; 
}

#ai-chat-body .chat-message.assistant { 
    background-color: #e9ecef !important; 
    color: #212529; 
    margin-right: auto; 
    border-bottom-left-radius: 1px; 
}

#ai-chat-body .chat-message.typing-indicator { 
    background-color: #e9ecef; 
    color: #6c757d; 
    font-style: italic; 
    margin-right: auto; 
    border-bottom-left-radius: 5px; 
    padding: 8px 12px; 
    display: inline-block; 
    max-width: 80%; 
}

#ai-chat-body .chat-message.typing-indicator span { 
    animation: blink 1s infinite; 
}

@keyframes blink { 
    50% { opacity: 0; } 
}

/* === FORMATOWANIE TREŚCI WIADOMOŚCI === */

/* Nagłówki - kompaktowe */
#ai-chat-body .chat-message.assistant h1,
#ai-chat-body .chat-message.assistant h2,
#ai-chat-body .chat-message.assistant h3 {
    font-size: 0.95em;
    font-weight: bold;
    margin: 2px 0 1px 0;
    color: #212529;
    line-height: 1.3;
}

/* Listy - kompaktowe */
#ai-chat-body .chat-message.assistant ul,
#ai-chat-body .chat-message.assistant ol {
    margin: 1px 0;
    padding-left: 16px;
    line-height: 1.3;
}

#ai-chat-body .chat-message.assistant li {
    margin: 1px 0;
    color: #495057;
}

/* Linki - dyskretne */
#ai-chat-body .chat-message.assistant a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

#ai-chat-body .chat-message.assistant a:hover {
    text-decoration: underline;
}

/* Specjalne style dla linków stron - nowoczesne label'e */
.chat-page-link {
    display: inline-block;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 4px 8px;
    margin: 2px 4px 2px 0;
    font-size: 0.75em;
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(13, 110, 253, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-page-link:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    border-color: #42a5f5;
    color: #0d47a1;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.2);
}

.chat-page-link::before {
    content: "🔗";
    margin-right: 4px;
    font-size: 0.7em;
    opacity: 0.8;
}

.chat-page-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.chat-page-link:hover::after {
    left: 100%;
}

/* Numery telefonów */
.chat-phone-number {
    font-weight: 600;
    color: #0d6efd;
}

/* Godziny */
.chat-hours {
    margin: 1px 0;
    font-size: 0.9em;
    color: #6c757d;
}

/* Lokalizacje */
.chat-location {
    color: #6c757d;
    font-weight: 500;
}

/* Pogrubienie */
#ai-chat-body .chat-message.assistant strong,
#ai-chat-body .chat-message.assistant b {
    color: #212529;
    font-weight: 600;
}

/* Kursywa */
#ai-chat-body .chat-message.assistant em,
#ai-chat-body .chat-message.assistant i {
    color: #6c757d;
    font-style: italic;
}

/* Sekcje - delikatne separatory */
.chat-section {
    margin: 4px 0 2px 0;
    border-top: 1px solid #f1f3f4;
    padding-top: 3px;
}

.chat-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Grupa lekarzy - bez separatora */
.chat-doctors-group {
    margin: 1px 0;
}

.chat-doctors-group ul {
    margin: 0;
    padding-left: 16px;
}

.chat-doctors-group li {
    margin: 0.5px 0;
    color: #495057;
}

/* Informacje o umawianiu wizyty - stylizowany box */
.chat-appointment-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 4px;
    font-size: 0.85em;
    color: #1976d2;
    font-weight: 500;
    line-height: 1.4;
} 

/* === RESPONSYWNOŚĆ === */

/* Tablet i mniejsze */
@media (max-width: 768px) {
    .ai-icon-container {
        width: 40px;
        height: 40px;
    }
    
    .ai-particle {
        width: 1.5px;
        height: 1.5px;
    }
    
    .ai-input-container-floating {
        width: 95%;
        top: 15px;
    }

    .ai-input-wrapper {
        border-radius: 10px !important;
    }
    
    .ai-input-wrapper.expanded .ai-chat-body {
        max-height: 480px;
    }
}

/* Telefony */
@media (max-width: 480px) {
    .ai-icon-container {
        width: 40px;
        height: 40px;
        margin-right: 6px;
    }
    
    .ai-particle {
        width: 1px;
        height: 1px;
    }
    
    .ai-input-container-floating {
        width: 98%;
        top: 10px;
    }

    .ai-input-wrapper {
        border-radius: 10px !important;
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .ai-input-wrapper.expanded .ai-chat-body {
        max-height: 420px;
    }
    
    #ai-chat-body .chat-message {
        max-width: 90%;
        font-size: 0.8em;
    }
}

/* === FLOATING CHAT STYLES === */

/* Overlay tła */
.floating-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.floating-chat-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Kontener floating chatu */
.floating-chat-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease-in-out;
}

.floating-chat-overlay.show .floating-chat-container {
    transform: scale(1) translateY(0);
}

/* Header floating chatu */
.floating-chat-header {
    padding: .5rem;
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
    background-color: #f8f9fa !important;
}



.floating-chat-header h5 {
    color: #08306c;
}

/* Przycisk NOWY w nagłówku floating chatu */
#floating-chat-new-button, #ai-chat-new-button {
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    font-size: 0.5em !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-color: #194c87;
    color: #194c87;
    padding: 4px 8px;
}

#floating-chat-new-button:hover, #ai-chat-new-button:hover {
    background-color: #001548;
    color: white;
    box-shadow: 0 3px 6px rgba(25, 135, 84, 0.3);
}

#ai-chat-new-button {
    display: none;
}

#ai-chat-close-button {
    display: none;
}

/* Body floating chatu */
.floating-chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Messages area - identyczne style jak homepage */
.floating-chat-messages {
    height: 300px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

/* Floating chat messages - identyczne style jak homepage */
.floating-chat-messages .chat-message { 
    margin-bottom: 10px; 
    padding: 8px 12px; 
    border-radius: 15px; 
    max-width: 80%; 
    word-wrap: break-word; 
    font-size: 0.85em;
}

.floating-chat-messages .chat-message.user { 
    background-color: #0d6efd !important; 
    color: white; 
    margin-left: auto; 
    border-bottom-right-radius: 5px; 
}

.floating-chat-messages .chat-message.assistant { 
    background-color: #e9ecef !important; 
    color: #212529; 
    margin-right: auto; 
    border-bottom-left-radius: 5px; 
}

/* Typing indicator dla floating chatu - identyczne jak homepage */
.floating-chat-messages .chat-message.typing-indicator { 
    background-color: #e9ecef; 
    color: #6c757d; 
    font-style: italic; 
    margin-right: auto; 
    border-bottom-left-radius: 5px; 
    padding: 8px 12px; 
    display: inline-block; 
    max-width: 80%; 
}

.floating-chat-messages .chat-message.typing-indicator span { 
    animation: blink 1s infinite; 
}

/* Input area - identyczne style jak homepage */
.floating-chat-input-area {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #e9ecef;
}

#floating-chat-input {
    border-radius: 8px 0 0 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    border-right: none;
}

#floating-chat-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    border-color: #0d6efd;
    z-index: 2;
}

#floating-chat-send {
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    border: 1px solid #0d6efd;
}

/* Formatowanie odpowiedzi asystenta w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-message.assistant h1,
.floating-chat-messages .chat-message.assistant h2,
.floating-chat-messages .chat-message.assistant h3 {
    font-size: 0.95em;
    font-weight: bold;
    margin: 2px 0 1px 0;
    color: #212529;
    line-height: 1.3;
}

.floating-chat-messages .chat-message.assistant ul,
.floating-chat-messages .chat-message.assistant ol {
    margin: 1px 0;
    padding-left: 16px;
    line-height: 1.3;
}

.floating-chat-messages .chat-message.assistant li {
    margin: 1px 0;
    color: #495057;
}

.floating-chat-messages .chat-message.assistant a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.floating-chat-messages .chat-message.assistant a:hover {
    text-decoration: underline;
}

/* Page links w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-page-link {
    display: inline-block;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 4px 8px;
    margin: -4px 0px 2px 0;
    bottom: -8px;
    font-size: 0.75em;
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(13, 110, 253, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.floating-chat-messages .chat-page-link:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    border-color: #42a5f5;
    color: #0d47a1;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.2);
}

.floating-chat-messages .chat-page-link::before {
    content: "🔗";
    margin-right: 4px;
    font-size: 0.7em;
    opacity: 0.8;
}

.floating-chat-messages .chat-page-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.floating-chat-messages .chat-page-link:hover::after {
    left: 100%;
}

/* Phone numbers w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-phone-number {
    font-weight: 600;
    color: #0d6efd;
}

/* Hours w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-hours {
    margin: 1px 0;
    font-size: 0.9em;
    color: #6c757d;
}

/* Locations w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-location {
    color: #6c757d;
    font-weight: 500;
}

/* Strong i em w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-message.assistant strong,
.floating-chat-messages .chat-message.assistant b {
    color: #212529;
    font-weight: 600;
}

.floating-chat-messages .chat-message.assistant em,
.floating-chat-messages .chat-message.assistant i {
    color: #6c757d;
    font-style: italic;
}

/* Sekcje w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-section {
    margin: 4px 0 2px 0;
    border-top: 1px solid #f1f3f4;
    padding-top: 3px;
}

.floating-chat-messages .chat-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Grupa lekarzy w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-doctors-group {
    margin: 1px 0;
}

.floating-chat-messages .chat-doctors-group ul {
    margin: 0;
    padding-left: 16px;
}

.floating-chat-messages .chat-doctors-group li {
    margin: 0.5px 0;
    color: #495057;
}

/* Informacje o umawianiu wizyty w floating chat - identyczne jak homepage */
.floating-chat-messages .chat-appointment-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 4px;
    font-size: 0.85em;
    color: #1976d2;
    font-weight: 500;
    line-height: 1.4;
}

/* Responsive floating chat */
@media (max-width: 768px) {
    .floating-chat-container {
        width: 90%;
        max-height: 70vh;
        margin: 5vh 0;
    }
    
    .floating-chat-header {
        padding: 0.2rem;
    }
    
    .floating-chat-input-area {
        padding: 0.75rem 1rem 1rem;
    }
    
    .floating-chat-messages {
        height: 250px;
    }
    
    .floating-chat-messages .chat-message {
        font-size: 0.8em;
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .floating-chat-container {
        width: 92%;
        height: auto;
        max-height: 75vh;
        margin: 5vh 0;
    }
    
    .floating-chat-messages {
        height: 220px;
    }
    
    .floating-chat-messages .chat-message {
        font-size: 0.8em;
        max-width: 90%;
    }
    
    .floating-chat-header {
        padding: 0.75rem 1rem;
    }
    
    .floating-chat-input-area {
        padding: 0.5rem 1rem 1rem;
    }
}

/* Bardzo małe telefony */
@media (max-width: 360px) {
    .floating-chat-container {
        width: 88%;
        max-height: 70vh;
        border-radius: 15px;
    }
    
    .floating-chat-messages {
        height: 200px;
        padding: 0.5rem !important; /* Override Bootstrap p-3 for very small screens */
    }
    
    .floating-chat-messages .chat-message {
        font-size: 0.75em;
        max-width: 95%;
    }
    
    .floating-chat-header {
        padding: 0.5rem 0.75rem;
    }
    
    .floating-chat-header h5 {
        font-size: 1rem;
    }
    
    .floating-chat-input-area {
        padding: 0.5rem 0.75rem 0.75rem;
    }
}