/* assets/css/nikobot-widget.css */
.nikobot-ai,
.nikobot-ai * {
    box-sizing: border-box;
}

.nikobot-ai [hidden] {
    display: none !important;
}

.nikobot-ai__button {
    appearance: none;
    border: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    margin: 0;
    padding: 0;
    z-index: 2147483001;
}

.nikobot-ai__button:focus-visible,
.nikobot-ai__retry:focus-visible {
    outline: 3px solid #2271b1;
    outline-offset: 3px;
}

.nikobot-ai__button img {
    display: block;
    height: 24px;
    margin: auto;
    width: 24px;
}

.nikobot-ai__launcher {
    align-items: center;
    bottom: max(24px, env(safe-area-inset-bottom));
    display: flex;
    gap: 12px;
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    z-index: 2147483001;
}

.nikobot-ai--open .nikobot-ai__launcher {
    display: none;
}

.nikobot-ai__availability {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    color: #1d2327;
    display: flex;
    font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    gap: 8px;
    max-width: min(240px, calc(100vw - 116px));
    min-height: 42px;
    padding: 10px 14px;
}

.nikobot-ai__availability-dot {
    background: #dba617;
    border-radius: 50%;
    flex: 0 0 auto;
    height: 10px;
    width: 10px;
}

.nikobot-ai[data-nikobot-state="online"] .nikobot-ai__availability-dot {
    background: #16883f;
}

.nikobot-ai[data-nikobot-state="offline"] .nikobot-ai__availability-dot {
    background: #b32d2e;
}

.nikobot-ai__open {
    align-items: center;
    background: #0f0f0f;
    border-radius: 50%;
    display: flex;
    height: 60px;
    justify-content: center;
    width: 60px;
}

.nikobot-ai__open:hover {
    background: #2b2b2b;
}

.nikobot-ai__panel {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    bottom: 96px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    height: min(680px, calc(100vh - 128px));
    overflow: hidden;
    position: fixed;
    right: 24px;
    width: min(400px, calc(100vw - 48px));
    z-index: 2147483000;
}

.nikobot-ai__close {
    align-items: center;
    background: rgba(15, 15, 15, 0.88);
    border-radius: 50%;
    display: flex;
    height: 44px;
    justify-content: center;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 44px;
}

.nikobot-ai__close:hover {
    background: #0f0f0f;
}

.nikobot-ai__iframe {
    background: #fff;
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.nikobot-ai__status {
    align-items: center;
    background: #fff;
    color: #1d2327;
    display: flex;
    flex-direction: column;
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    inset: 0;
    justify-content: center;
    padding: 72px 32px 32px;
    position: absolute;
    text-align: center;
}

.nikobot-ai__retry {
    appearance: none;
    background: #0f0f0f;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin-top: 16px;
    padding: 12px 18px;
}

@media (max-width: 600px) {
    .nikobot-ai__panel {
        border: 0;
        border-radius: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh;
        left: 0;
        right: 0;
        top: 0;
        width: 100vw;
    }

    .nikobot-ai__close {
        right: max(12px, env(safe-area-inset-right));
        top: max(12px, env(safe-area-inset-top));
    }
}

@media (prefers-reduced-motion: reduce) {
    .nikobot-ai__button,
    .nikobot-ai__panel {
        scroll-behavior: auto;
        transition: none;
    }
}
