:root {
    --edubot-drawer-space: 410px;
}

.edubot-root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #13284c;
}

.edubot-root [hidden] {
    display: none !important;
}

.edubot-launcher {
    position: fixed;
    z-index: 1035;
    right: 20px;
    bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.edubot-launcher:hover,
.edubot-launcher:focus-visible {
    transform: translateY(-4px);
}

.edubot-launcher:focus-visible,
.edubot-root button:focus-visible,
.edubot-root a:focus-visible {
    outline: 3px solid #58b9ff;
    outline-offset: 3px;
}

.edubot-launcher-label {
    border: 1px solid #75b9ff;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: #092250;
    box-shadow: 0 10px 25px rgba(8, 34, 80, .17);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
}

.edubot-launcher-avatar,
.edubot-header-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    border: 2px solid #7bd0ff;
    border-radius: 50%;
    background: radial-gradient(circle at 48% 38%, #2f64ac, #061b44 75%);
    box-shadow: 0 0 0 5px rgba(79, 164, 255, .14), 0 12px 30px rgba(5, 25, 61, .28);
}

.edubot-launcher-avatar {
    width: 72px;
    height: 72px;
}

.edubot-launcher-avatar img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.edubot-header-avatar {
    width: 47px;
    height: 47px;
    box-shadow: none;
}

.edubot-header-avatar img {
    display: block;
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.edubot-backdrop {
    position: fixed;
    z-index: 1038;
    inset: 0;
    visibility: hidden;
    opacity: 0;
    background: rgba(4, 15, 36, .48);
    transition: opacity .25s ease, visibility .25s ease;
    pointer-events: none;
}

.edubot-panel {
    position: fixed;
    z-index: 1040;
    top: 84px;
    right: 14px;
    bottom: 14px;
    display: flex;
    width: 386px;
    max-width: calc(100vw - 28px);
    flex-direction: column;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateX(calc(100% + 24px));
    border: 1px solid #8bbcef;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(7, 30, 68, .24);
    pointer-events: none;
    transition: transform .28s ease, opacity .28s ease, visibility .28s ease;
}

.edubot-public .edubot-panel {
    top: 112px;
}

body.edubot-open .edubot-panel {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

body.edubot-open .edubot-launcher {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.edubot-panel-header {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #d2e7ff;
    padding: 12px 16px;
    background: linear-gradient(125deg, #081e4a, #0b3476);
}

.edubot-header-name {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.edubot-header-name strong {
    color: #fff;
    font-size: 16px;
    font-weight: 850;
    letter-spacing: .07em;
}

.edubot-header-name small {
    color: #bbdcff;
    font-size: 12px;
}

.edubot-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.edubot-icon-button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(187, 220, 255, .55);
    border-radius: 50%;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
}

.edubot-icon-button:hover,
.edubot-icon-button[aria-pressed="true"] {
    color: #062650;
    background: #b8e7ff;
}

.edubot-panel-body {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding: 15px;
    background: linear-gradient(180deg, #f1f7ff 0%, #fff 40%);
}

.edubot-shortcuts {
    display: grid;
    flex: 0 0 auto;
    gap: 8px;
}

.edubot-shortcut {
    display: flex;
    width: 100%;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #d4e4f8;
    border-radius: 15px;
    padding: 10px 14px;
    color: #12315d;
    background: #fff;
    box-shadow: 0 4px 12px rgba(16, 62, 123, .04);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.edubot-shortcut:hover {
    transform: translateY(-2px);
    border-color: #80bdff;
    background: #f5faff;
}

.edubot-shortcut span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edubot-shortcut strong {
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .07em;
}

.edubot-shortcut small {
    color: #6580a3;
    font-size: 12px;
}

.edubot-shortcut i {
    color: #2a78d8;
    font-size: 15px;
}

.edubot-conversation {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 3px;
}

.edubot-message {
    max-width: 94%;
    border-radius: 17px;
    padding: 13px 15px;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.edubot-message-assistant {
    border: 1px solid #d9e4f2;
    border-bottom-left-radius: 5px;
    color: #223655;
    background: #fff;
    box-shadow: 0 5px 18px rgba(31, 67, 110, .06);
}

.edubot-message-user {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    color: #fff;
    background: #0b63cf;
}

.edubot-root .edubot-message a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    border-radius: 8px;
    padding: 7px 10px;
    color: #fff !important;
    background: #0c5ec1;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.edubot-root .edubot-message a:hover {
    color: #fff !important;
    background: #084a9b;
}

.edubot-compose {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #dce9f7;
    padding: 12px;
    background: #fff;
}

.edubot-compose input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    flex: 1;
    border: 1px solid #cbdced;
    border-radius: 12px;
    padding: 0 12px;
    color: #152c4e;
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.edubot-compose input:focus {
    border-color: #347de2;
    outline: 2px solid rgba(52, 125, 226, .2);
}

.edubot-compose .edubot-mic {
    color: #115bb2;
    border-color: #cbdced;
    background: #f4f9ff;
}

.edubot-send {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 12px;
    padding: 0 13px;
    color: #fff;
    background: #0b63cf;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.edubot-send:hover {
    background: #084eaa;
}

.edubot-status {
    min-height: 0;
    margin: 0;
    padding: 0 12px;
    color: #5e7898;
    background: #fff;
    font-size: 12px;
}

.edubot-status:not(:empty) {
    min-height: 21px;
    padding-bottom: 6px;
}

.edubot-sidebar-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

@media (min-width: 1281px) {
    .edubot-panel {
        bottom: 100px;
    }

    body.edubot-open .edubot-launcher {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    body.edubot-open .edubot-launcher-label {
        display: none;
    }

    body.edubot-app.edubot-open .main-panel {
        width: calc(100% - 280px - var(--edubot-drawer-space)) !important;
        margin-right: var(--edubot-drawer-space);
        transition: width .28s ease, margin-right .28s ease;
    }

    body.edubot-app.edubot-open.sidebar-icon-only .main-panel {
        width: calc(100% - 70px - var(--edubot-drawer-space)) !important;
    }

    body.edubot-public.edubot-open .container-scroller {
        width: calc(100% - var(--edubot-drawer-space));
        transition: width .28s ease;
    }

    body.edubot-public.edubot-open .mega-nav {
        grid-template-columns: 1fr auto auto;
    }

    body.edubot-public.edubot-open .mega-menu {
        display: none;
    }

    body.edubot-public.edubot-open .mega-nav-toggle {
        display: inline-flex;
    }

    body.edubot-public.edubot-open .mega-mobile-nav.show,
    body.edubot-public.edubot-open .mega-mobile-nav.collapsing {
        display: block !important;
    }
}

@media (max-width: 1280px) {
    body.edubot-open .edubot-backdrop {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 600px) {
    .edubot-panel,
    .edubot-public .edubot-panel {
        top: 0;
        right: 0;
        bottom: 0;
        width: min(100vw, 430px);
        max-width: 100vw;
        border-radius: 0;
    }

    .edubot-launcher {
        right: 14px;
        bottom: 14px;
    }

    .edubot-launcher-label {
        padding: 9px 12px;
        font-size: 11px;
    }

    .edubot-launcher-avatar {
        width: 62px;
        height: 62px;
    }

    .edubot-launcher-avatar img {
        width: 56px;
        height: 56px;
    }

    .edubot-panel-body {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .edubot-panel,
    .edubot-launcher,
    .edubot-backdrop,
    .edubot-shortcut {
        transition: none;
    }
}
