/* ─── Lietaj.me Chatbot – Styles ─────────────────────────────────────────── */

#lmc-chatbot {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
}
#lmc-chatbot * {
    pointer-events: auto;
    box-sizing: border-box;
}

/* ─── Bubble tlačidlo ─── */
#lmc-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    height: 48px;
    padding: 0 20px 0 16px;
    border-radius: 28px;
    background: var(--lmc-color, #FF6B35);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255,107,53,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    min-width: 48px;
}
#lmc-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(255,107,53,0.55);
}
#lmc-bubble-open {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
#lmc-bubble-open svg {
    flex-shrink: 0;
}
#lmc-bubble-close {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    display: none;
}

/* Zelená online bodka na bubble */
#lmc-bubble-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #fff;
    position: absolute;
    top: -2px;
    left: -2px;
    flex-shrink: 0;
}

/* Badge (nová správa) */
#lmc-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    animation: lmc-pulse 1.5s infinite;
}
@keyframes lmc-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(229,57,53,.6); }
    70%  { box-shadow: 0 0 0 8px rgba(229,57,53,0); }
    100% { box-shadow: 0 0 0 0 rgba(229,57,53,0); }
}

/* ─── Preview popup bublina ─── */
#lmc-preview {
    position: fixed;
    bottom: 84px;
    right: 24px;
    width: 300px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    padding: 16px 16px 14px;
    animation: lmc-fadeIn 0.25s ease;
    max-width: calc(100vw - 16px);
}
#lmc-preview-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}
#lmc-preview-close:hover { color: #555; }
#lmc-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
#lmc-preview-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
#lmc-preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--lmc-color, #FF6B35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}
#lmc-preview-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #fff;
    position: absolute;
    bottom: 1px;
    right: 1px;
}
#lmc-preview-name {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
}
#lmc-preview-msg {
    font-size: 13px;
    color: #444;
    line-height: 1.55;
    margin-bottom: 14px;
    padding-right: 10px;
}
#lmc-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: var(--lmc-color, #FF6B35);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    font-family: inherit;
}
#lmc-preview-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* ─── Chat okno ─── */
#lmc-window {
    position: fixed;
    bottom: 84px;
    right: 24px;
    width: 360px;
    max-height: 560px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: lmc-fadeIn 0.25s ease;
    max-width: calc(100vw - 16px);
}
@keyframes lmc-fadeIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Header ─── */
#lmc-header {
    background: var(--lmc-color, #FF6B35);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
#lmc-header-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
#lmc-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}
#lmc-header-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--lmc-color, #FF6B35);
    position: absolute;
    bottom: 1px;
    right: 1px;
}
#lmc-header-name {
    font-weight: 700;
    font-size: 15px;
    flex: 1;
}
#lmc-header-status {
    font-size: 11px;
    opacity: 0.85;
    display: block;
    margin-top: 2px;
}
#lmc-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.15s;
}
#lmc-close-btn:hover { opacity: 1; }

/* ─── Správy ─── */
#lmc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f4f7fb;
    min-height: 280px;
    max-height: 380px;
    scroll-behavior: smooth;
}
.lmc-msg {
    display: flex;
    flex-direction: column;
    max-width: 82%;
    animation: lmc-msgIn 0.2s ease;
}
@keyframes lmc-msgIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lmc-msg.bot  { align-self: flex-start; }
.lmc-msg.user { align-self: flex-end; }

.lmc-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
}
.lmc-msg.bot .lmc-msg-bubble {
    background: #fff;
    color: #222;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.lmc-msg.user .lmc-msg-bubble {
    background: var(--lmc-color, #FF6B35);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.lmc-msg-time {
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
    padding: 0 4px;
}
.lmc-msg.user .lmc-msg-time { text-align: right; }

/* ─── Typing indicator ─── */
#lmc-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: #fff;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
#lmc-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #bbb;
    display: inline-block;
    animation: lmc-bounce 1.2s infinite;
}
#lmc-typing span:nth-child(2) { animation-delay: 0.2s; }
#lmc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes lmc-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%            { transform: translateY(-5px); }
}

/* ─── Input ─── */
#lmc-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #eee;
}
#lmc-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    max-height: 100px;
    overflow-y: auto;
    transition: border-color 0.15s;
    line-height: 1.4;
}
#lmc-input:focus { border-color: var(--lmc-color, #FF6B35); }
#lmc-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--lmc-color, #FF6B35);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.15s, transform 0.15s;
}
#lmc-send:hover { opacity: 0.88; transform: scale(1.07); }
#lmc-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ─── Footer ─── */
#lmc-footer {
    text-align: center;
    font-size: 10px;
    color: #bbb;
    padding: 6px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
    #lmc-bubble {
        height: 42px;
        padding: 0 14px 0 12px;
        bottom: 12px;
        right: 12px;
        font-size: 13px;
    }
    #lmc-bubble-open { gap: 6px; font-size: 13px; }
    #lmc-preview {
        bottom: 66px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
    }
    #lmc-window {
        position: fixed;
        bottom: 66px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
        max-height: 35vh;
        border-radius: 12px;
    }
    #lmc-messages {
        min-height: 60px;
        max-height: calc(35vh - 110px);
        padding: 8px;
        font-size: 12px;
        gap: 6px;
    }
    .lmc-msg-bubble {
        font-size: 12px;
        padding: 7px 10px;
    }
    .lmc-msg-time { font-size: 10px; }
    #lmc-header { padding: 8px 10px; }
    #lmc-avatar { font-size: 18px; }
    #lmc-header-name { font-size: 13px; }
    #lmc-header-status { font-size: 10px; }
    #lmc-input-area { padding: 6px 8px; }
    #lmc-input { font-size: 12px; padding: 6px 10px; }
    #lmc-send { width: 30px; height: 30px; font-size: 13px; }
    #lmc-footer { font-size: 9px; padding: 4px; }
}
