/* ============================================
   KADR.AI — Chat Bubble + Tooltip (initial CSS)
   ============================================
   Minimalny CSS dla widoczności dymka chatu i tooltipa POWITALNEGO,
   ładowany SYNCHRONICZNIE przed renderowaniem body. Komplementarny do
   chat.css (lazy-loaded po kliknięciu w dymek).

   Powód osobnego pliku (zamiast scalenia z chat.css):
   chat.css jest lazy-loaded przez js/chat-bubble.js DOPIERO po klik'u —
   gdyby reguły dla samego dymka też tam były, dymek nie miałby stylu
   przy pierwszym wejściu na stronę i pojawiłby się dopiero po klik'u
   (nie da się kliknąć dymka który jest niewidoczny).

   Wyekstraktowane z kadr_step3.html (Faza 6.3 audytu) — pozwala na
   HTTP cache (max-age=86400) zamiast re-parsingu inline CSS przy F5.
   ============================================ */

.kchat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #174429;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(30, 83, 54, .4);
    z-index: 9998;
    transition: transform .2s, box-shadow .2s;
    animation: kchat-pulse 3s ease-in-out infinite;
}

.kchat-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(30, 83, 54, .5);
}

.kchat-bubble-icon {
    display: block;
    pointer-events: none;
    transition: transform .2s;
}

.kchat-bubble:hover .kchat-bubble-icon {
    transform: scale(1.08);
}

@keyframes kchat-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(30, 83, 54, .4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(30, 83, 54, .4),
                    0 0 0 12px rgba(30, 83, 54, .08);
    }
}

@media (max-width: 480px) {
    .kchat-bubble {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
    .kchat-tooltip {
        bottom: 80px !important;
        right: 16px !important;
    }
}

.kchat-tooltip {
    position: fixed;
    bottom: 96px;
    right: 24px;
    background: #fff;
    color: #1A1A1A;
    padding: 12px 36px 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    z-index: 9997;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .4s ease, transform .4s ease;
    pointer-events: none;
    max-width: 260px;
}

.kchat-tooltip-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.kchat-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 28px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

.kchat-tooltip-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.kchat-tooltip-close:hover {
    color: #333;
}
