/* Onlinemagneet — Magneet Live Chat (premium widget) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800&display=swap');

.om-lc-root {
    --om-lc-orange: #FF6B35;
    --om-lc-red: #E63946;
    --om-lc-glow: rgba(255, 107, 53, 0.55);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    z-index: 99999;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
}

.om-lc-launcher {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(145deg, var(--om-lc-orange) 0%, var(--om-lc-red) 100%);
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 16px 48px var(--om-lc-glow), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.om-lc-launcher:hover {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 20px 56px var(--om-lc-glow);
}

.om-lc-launcher__ring,
.om-lc-launcher__ring2 {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 107, 53, 0.45);
    pointer-events: none;
    animation: om-lc-ring 2.8s ease-out infinite;
}

.om-lc-launcher__ring2 { animation-delay: 1.4s; }

@keyframes om-lc-ring {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.55); opacity: 0; }
}

.om-lc-launcher__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--om-lc-red);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    animation: om-lc-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes om-lc-badge-pop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.om-lc-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: min(400px, calc(100vw - 2rem));
    height: min(600px, calc(100dvh - 100px));
    max-height: calc(100dvh - 100px);
    border-radius: 1.5rem;
    overflow: hidden;
    display: none;
    flex-direction: column;
    background: #0a0e14;
    border: 1px solid rgba(255, 107, 53, 0.25);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.65), 0 0 80px rgba(255, 107, 53, 0.08);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    pointer-events: none;
}

.om-lc-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: radial-gradient(ellipse 80% 100% at 50% -20%, rgba(255, 107, 53, 0.2), transparent);
    pointer-events: none;
}

.om-lc-panel.is-open {
    display: flex;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    animation: om-lc-panel-in 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes om-lc-panel-in {
    from { transform: translateY(16px) scale(0.96); }
    to { transform: translateY(0) scale(1); }
}

/* Actieve chat: flex-kolom zodat berichten de vrije hoogte pakken */
.om-lc-panel.is-open.is-chatting {
    display: flex;
    flex-direction: column;
}

.om-lc-panel.is-chatting .om-lc-head {
    flex-shrink: 0;
    min-width: 0;
    padding: 0.6rem 0.85rem;
    gap: 0.55rem;
}

.om-lc-panel.is-chatting .om-lc-head-text p,
.om-lc-panel.is-chatting .om-lc-ai-tag {
    display: none;
}

.om-lc-panel.is-chatting .om-lc-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.75rem;
}

.om-lc-panel.is-chatting .om-lc-head-text h3 {
    font-size: 0.95rem;
}
.om-lc-panel.is-chatting .om-lc-msgs {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}
.om-lc-panel.is-chatting .om-lc-chips {
    flex-shrink: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 46px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.om-lc-panel.is-chatting .om-lc-chips::-webkit-scrollbar {
    display: none;
}

.om-lc-panel.is-chatting .om-lc-chips button {
    flex-shrink: 0;
    white-space: nowrap;
}
.om-lc-panel.is-chatting .om-lc-form {
    flex-shrink: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.om-lc-panel.is-chatting .om-lc-promise,
.om-lc-panel.is-chatting .om-lc-prechat { display: none !important; }

.om-lc-head {
    position: relative;
    flex-shrink: 0;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.om-lc-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.om-lc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--om-lc-orange), var(--om-lc-red));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    overflow: hidden;
}

.om-lc-avatar--photo img,
.om-lc-prechat-avatar.om-lc-avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.om-lc-avatar-pulse {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #0a0e14;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

.om-lc-head-text h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.om-lc-head-text p {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
}

.om-lc-ai-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #FF8C42;
    margin-top: 0.25rem;
}

.om-lc-close {
    margin-left: auto;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.om-lc-promise {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
    font-size: 0.6875rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.14), rgba(230, 57, 70, 0.08));
    border-bottom: 1px solid rgba(255, 107, 53, 0.15);
}

.om-lc-promise__dot {
    width: 8px;
    height: 8px;
    margin-top: 0.2rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
    flex-shrink: 0;
}

.om-lc-msgs {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.om-lc-msg {
    max-width: 92%;
    padding: 0;
    border-radius: 1.1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    animation: om-lc-msg-in 0.35s ease;
    overflow: visible;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.om-lc-msg__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem 0.35rem;
}

.om-lc-msg__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--om-lc-orange), var(--om-lc-red));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 107, 53, 0.45);
}

.om-lc-msg__avatar--photo {
    padding: 0;
    border-color: var(--om-lc-orange);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.om-lc-msg__avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.om-lc-msg--owner .om-lc-msg__avatar {
    width: 36px;
    height: 36px;
    font-size: 0.6875rem;
}

.om-lc-msg--ai .om-lc-msg__avatar {
    font-size: 0.75rem;
}

.om-lc-msg__who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.om-lc-msg__who strong {
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.om-lc-msg__who span {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.2;
}

.om-lc-msg__body {
    padding: 0 0.85rem 0.75rem;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

@keyframes om-lc-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.om-lc-msg--them {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    border-bottom-left-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.om-lc-msg--them.om-lc-msg--brand {
    background: linear-gradient(160deg, rgba(255, 107, 53, 0.18), rgba(20, 24, 32, 0.95));
    border-color: rgba(255, 107, 53, 0.28);
}

.om-lc-msg--them.om-lc-msg--owner {
    max-width: 100%;
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
    background: linear-gradient(165deg, rgba(255, 107, 53, 0.28), rgba(18, 22, 30, 0.98));
    border: 1px solid rgba(255, 107, 53, 0.45);
    box-shadow: 0 10px 32px rgba(255, 107, 53, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.om-lc-msg--owner .om-lc-msg__head {
    padding: 0.7rem 0.9rem 0.4rem;
}

.om-lc-msg--owner .om-lc-msg__who strong {
    font-size: 0.8125rem;
}

.om-lc-msg--owner .om-lc-msg__body {
    padding: 0 0.95rem 0.85rem;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.om-lc-msg--them.om-lc-msg--ai {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.12), rgba(230, 57, 70, 0.08));
    border-color: rgba(255, 107, 53, 0.2);
}

.om-lc-msg--me {
    align-self: flex-end;
    max-width: 85%;
    padding: 0.7rem 0.95rem;
    background: linear-gradient(135deg, var(--om-lc-orange), var(--om-lc-red));
    color: #fff;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.25);
    white-space: pre-wrap;
}

.om-lc-msg--sys {
    align-self: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    padding: 0.25rem;
}

.om-lc-sla {
    align-self: stretch;
    display: flex;
    gap: 0.65rem;
    padding: 0.85rem;
    border-radius: 1rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.22);
    animation: om-lc-msg-in 0.35s ease;
}

.om-lc-sla__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.om-lc-sla__body strong {
    display: block;
    font-size: 0.75rem;
    color: #86efac;
    margin-bottom: 0.25rem;
}

.om-lc-sla__body p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}

.om-lc-sla__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.om-lc-sla__steps span {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}

.om-lc-typing {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    border-bottom-left-radius: 0.25rem;
    border: 1px solid rgba(255, 107, 53, 0.15);
}

.om-lc-typing .om-lc-msg__avatar {
    width: 28px;
    height: 28px;
}

.om-lc-typing__label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.2rem;
}

.om-lc-typing__dots {
    display: flex;
    gap: 4px;
}

.om-lc-typing__dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.8);
    animation: om-lc-dot 1.2s infinite;
}

.om-lc-typing__dots span:nth-child(2) { animation-delay: 0.15s; }
.om-lc-typing__dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes om-lc-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

.om-lc-chips {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 1rem 0.55rem;
}

.om-lc-chips button {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 107, 53, 0.35);
    background: rgba(255, 107, 53, 0.1);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
}

.om-lc-chips button:hover {
    background: rgba(255, 107, 53, 0.25);
    transform: translateY(-1px);
}

.om-lc-form {
    flex-shrink: 0;
    padding: 0.75rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 0.55rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
}

.om-lc-form input {
    flex: 1;
    min-width: 0;
    padding: 0.8rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.875rem;
    font-family: inherit;
}

.om-lc-form input:focus {
    outline: none;
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.om-lc-form button {
    width: 46px;
    min-width: 46px;
    flex-shrink: 0;
    height: 46px;
    border-radius: 0.85rem;
    border: none;
    background: linear-gradient(135deg, var(--om-lc-orange), var(--om-lc-red));
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
}

.om-lc-prechat {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
}

.om-lc-prechat-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--om-lc-orange), var(--om-lc-red));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.35);
    overflow: hidden;
    border: 3px solid rgba(255, 107, 53, 0.35);
}

.om-lc-prechat-promise {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.om-lc-prechat-promise div {
    text-align: center;
    padding: 0.55rem 0.35rem;
    border-radius: 0.75rem;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.om-lc-prechat-promise strong {
    display: block;
    font-size: 0.8125rem;
    color: #fff;
}

.om-lc-prechat-promise span {
    display: block;
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 0.1rem;
}

.om-lc-prechat-hero {
    text-align: center;
    margin-bottom: 0.5rem;
}

.om-lc-prechat-hero .emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.om-lc-prechat-hero h4 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
}

.om-lc-prechat-hero p {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
}

.om-lc-prechat input {
    padding: 0.8rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: inherit;
}

.om-lc-prechat button[type="button"]:first-of-type,
.om-lc-prechat #omLcStart {
    padding: 0.95rem;
    border-radius: 0.85rem;
    border: none;
    background: linear-gradient(135deg, var(--om-lc-orange), var(--om-lc-red));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9375rem;
}

.om-lc-prechat #omLcSkip {
    padding: 0.75rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    cursor: pointer;
}

.om-lc-root.is-panel-open {
    z-index: 100000;
}

.om-lc-root.is-mobile .om-lc-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    z-index: 100001;
}

.om-lc-root.is-mobile.is-panel-open .om-lc-launcher {
    display: none;
}

@media (max-width: 768px) {
    .om-lc-root {
        right: max(1rem, env(safe-area-inset-right));
        bottom: max(1rem, env(safe-area-inset-bottom));
        left: auto;
    }

    .om-lc-root.is-panel-open .om-lc-launcher { display: none; }

    .om-lc-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        z-index: 100001;
    }

    .om-lc-head {
        padding-top: calc(0.85rem + env(safe-area-inset-top));
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .om-lc-msgs {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .om-lc-form {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: calc(0.9rem + env(safe-area-inset-bottom));
    }

    .om-lc-chips {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .om-lc-prechat-promise { gap: 0.35rem; }
    .om-lc-prechat-promise strong { font-size: 0.75rem; }

    .om-lc-msg--them.om-lc-msg--owner {
        max-width: 100%;
    }
}

html.om-lc-body-lock,
body.om-lc-body-lock {
    overflow: hidden;
    overscroll-behavior: none;
}
