.mm-hotline-toggle {
    position: fixed;
    right: 18px;
    bottom: 34px;
    z-index: 30000;
    border: 0;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    padding: 0;
    background: #d65a24;
    color: #fff;
    font-size: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mm-hotline-toggle:hover,
.mm-hotline-toggle:focus {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
}

.mm-hotline-live-dot {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.24);
}

/* Badge na floating buttone (neprečítané správy od admina) */
.mm-hotline-btn-badge {
    position: absolute;
    left: -4px;
    top: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
    pointer-events: none;
}

.mm-hotline-panel {
    position: fixed;
    right: 18px;
    bottom: 110px;
    width: min(380px, calc(100vw - 28px));
    z-index: 30000;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 24px;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.22);
    display: none;
    overflow: hidden;
    max-height: min(72vh, 640px);
}

.mm-hotline-panel.is-open {
    display: flex;
    flex-direction: column;
}

.mm-hotline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    background: #d65a24;
    color: #fff;
}

.mm-hotline-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mm-hotline-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.28);
    font-size: 1.1rem;
}

.mm-hotline-brand-text strong,
.mm-hotline-brand-text span {
    display: block;
}

.mm-hotline-brand-text strong {
    font-size: 1rem;
}

.mm-hotline-brand-text span {
    font-size: 0.84rem;
    opacity: 0.9;
}

.mm-hotline-close {
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.1rem;
}

.mm-hotline-body {
    padding: 12px;
    border-top: 1px solid #e2e8f0;
}

.mm-hotline-chat {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
    overflow-y: auto;
    min-height: 180px;
}

.mm-msg {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.35;
    font-size: 0.92rem;
}

.mm-msg-bot {
    align-self: flex-start;
    background: #fff;
    color: #0f172a;
    border: 1px solid #dbe2ee;
}

.mm-msg-user {
    align-self: flex-end;
    background: #d65a24;
    color: #fff;
}

.mm-hotline-panel .mm-row {
    margin-bottom: 8px;
}

.mm-hotline-panel input,
.mm-hotline-panel textarea {
    width: 100%;
    border: 1px solid #d6dde8;
    border-radius: 14px;
    padding: 11px 12px;
    font: inherit;
    background: #f8fafc;
}

.mm-hotline-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mm-hotline-meta .mm-row {
    margin: 0;
}

.mm-hotline-composer {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.mm-hotline-composer textarea {
    min-height: 46px;
    max-height: 112px;
    resize: vertical;
    background: #fff;
}

.mm-hotline-composer button[type="submit"] {
    border: 0;
    border-radius: 12px;
    background: #d65a24;
    color: #fff;
    width: 46px;
    height: 46px;
    flex: none;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.18);
}

.mm-hotline-status {
    font-size: 0.85rem;
    margin-top: 8px;
    color: #475569;
}

/* Lišta "konverzácia vybavená" – zobrazí sa namiesto formulára */
.mm-hotline-closed-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f0fdf4;
    color: #15803d;
    font-size: 0.9rem;
    font-weight: 600;
}

.mm-hotline-closed-bar .bi {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Chat keď je vlákno closed – jemne zosivenie, bez možnosti písať */
.mm-hotline-chat.mm-chat-closed {
    opacity: 0.72;
}

@media (max-width: 560px) {
    .mm-hotline-meta {
        grid-template-columns: 1fr;
    }
}

/* ---------- Mobile rozšírenia hotline widgetu -------------------- */
@media (max-width: 767px) {
    /* Toggle button – safe area handled in theme.css via CSS vars */
    .mm-hotline-toggle {
        width: 56px;
        height: 56px;
        font-size: 1.35rem;
    }

    /* Panel – full-width s malými okrajmi */
    .mm-hotline-panel {
        right: max(8px, env(safe-area-inset-right, 0px));
        left:  max(8px, env(safe-area-inset-left,  0px));
        width: auto;
        bottom: max(90px, calc(80px + env(safe-area-inset-bottom, 0px)));
        border-radius: 18px;
        max-height: min(80vh, 560px);
    }

    /* Header trošku kompaktnejší */
    .mm-hotline-header {
        padding: 11px 12px 10px;
    }

    .mm-hotline-brand-text strong { font-size: 0.95rem; }
    .mm-hotline-brand-text span   { font-size: 0.8rem; }

    /* Chat oblasť trochu vyššia na mobile */
    .mm-hotline-chat {
        min-height: 140px;
    }

    /* Správy trochu menší font */
    .mm-msg { font-size: 0.88rem; }

    /* Composer – textarea a tlačidlo */
    .mm-hotline-composer textarea { min-height: 42px; }
    .mm-hotline-composer button[type="submit"] {
        width: 42px;
        height: 42px;
    }
}


/* ── "Zanechajte e-mail" box (zobrazí sa po 5 min bez odpovede) ─── */
.mm-hotline-leave-email {
    margin: 0 12px 12px;
    background: #fff8f3;
    border: 1px solid #f5d0b5;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.88rem;
}

.mm-leave-email-msg {
    color: #7c3a0a;
    margin-bottom: 10px;
    line-height: 1.4;
}

.mm-leave-email-msg .bi {
    color: #d65a24;
}

#mm-leave-email-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#mm-leave-email-form input[type="email"] {
    width: 100%;
    border: 1px solid #f5d0b5;
    border-radius: 10px;
    padding: 9px 12px;
    font: inherit;
    font-size: 0.88rem;
    background: #fff;
    box-sizing: border-box;
}

#mm-leave-email-form input[type="email"]:focus {
    outline: none;
    border-color: #d65a24;
}

#mm-leave-email-form button[type="submit"] {
    align-self: flex-start;
    border: 0;
    border-radius: 10px;
    background: #d65a24;
    color: #fff;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s;
}

#mm-leave-email-form button[type="submit"]:hover {
    background: #b84d1e;
}

.mm-leave-email-status {
    font-size: 0.82rem;
    color: #7c3a0a;
    min-height: 1.2em;
}

.mm-leave-email-confirm {
    color: #15803d;
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.5;
}
