.ai-launcher {
    bottom: 1.35rem;
    font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: fixed;
    right: 1.35rem;
    z-index: 1600;
}

.ai-launcher-backdrop {
    background: rgba(15, 23, 42, 0.2);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.25s ease;
}

.ai-launcher-trigger {
    align-items: center;
    background: linear-gradient(135deg, #2f6bff 0%, #69b6ff 100%);
    border: none;
    border-radius: 999px;
    box-shadow: 0 14px 28px rgba(47, 107, 255, 0.28);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    padding: 6px;
    position: relative;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-launcher-trigger:hover {
    box-shadow: 0 18px 34px rgba(47, 107, 255, 0.32);
    transform: translateY(-2px);
}

.ai-launcher-icon-shell {
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    display: flex;
    height: 62px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    width: 62px;
}

.ai-launcher-icon {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.ai-launcher-tooltip {
    background: #1f2a56;
    border-radius: 999px;
    bottom: calc(100% + 0.85rem);
    color: #ffffff;
    font-size: 0.85rem;
    left: 50%;
    opacity: 0;
    padding: 0.45rem 0.85rem;
    pointer-events: none;
    position: absolute;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.ai-launcher-trigger:hover .ai-launcher-tooltip,
.ai-launcher-trigger:focus-visible .ai-launcher-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ai-launcher-panel {
    background: #ffffff;
    border: 1px solid rgba(66, 85, 255, 0.12);
    border-radius: 28px;
    bottom: calc(100% + 1rem);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    height: min(700px, calc(100vh - 6.5rem));
    max-height: 720px;
    max-width: calc(100vw - 2rem);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
    width: min(416px, calc(100vw - 2rem));
}

.ai-launcher-panel:focus {
    outline: none;
}

.ai-launcher-panel-header {
    align-items: center;
    background: linear-gradient(135deg, #20358e 0%, #4255ff 100%);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 0.95rem 0.85rem;
}

.ai-launcher-panel-copy {
    min-width: 0;
}

.ai-launcher-panel-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    opacity: 0.8;
    text-transform: uppercase;
}

.ai-launcher-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.ai-launcher-panel-plan {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.70rem;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0;
    max-width: 100%;
    padding: 0.20rem 0.50rem;
    letter-spacing: normal;
    text-transform: none;
}

.ai-launcher-panel-quota {
    background: rgba(255, 255, 255, 0.24);
}

.ai-launcher-panel-actions {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 0.5rem;
}

.ai-launcher-panel-link,
.ai-launcher-panel-close {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    text-decoration: none;
    width: 40px;
}

.ai-launcher-panel-link:hover,
.ai-launcher-panel-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.ai-launcher-panel-link:focus-visible,
.ai-launcher-panel-close:focus-visible,
.ai-launcher-trigger:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.ai-launcher-panel-body {
    background: #f5f7ff;
    flex: 1 1 auto;
    min-height: 0;
}

.ai-launcher-frame {
    border: none;
    display: block;
    height: 100%;
    width: 100%;
}

.ai-launcher.is-open .ai-launcher-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.ai-launcher.is-open .ai-launcher-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.ai-launcher.is-open .ai-launcher-trigger {
    box-shadow: 0 18px 38px rgba(32, 53, 142, 0.34);
}

body.ai-chat-open {
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .ai-launcher {
        bottom: 0.9rem;
        right: 0.9rem;
    }

    .ai-launcher-icon-shell {
        height: 58px;
        width: 58px;
    }

    .ai-launcher-panel {
        border-radius: 22px;
        bottom: calc(100% + 0.8rem);
        height: min(82vh, 680px);
        width: min(100vw - 1rem, 392px);
    }

    .ai-launcher-trigger {
        padding: 5px;
    }
}

@media (max-width: 425px) {
    .ai-launcher {
        bottom: 0.7rem;
        right: 0.7rem;
    }

    .ai-launcher-panel {
        bottom: calc(100% + 0.65rem);
        border-radius: 20px;
        height: min(84vh, 680px);
        width: min(100vw - 0.7rem, 400px);
    }
}
