/**
 * Fixed floating controls: Ruby (bottom-right), back-to-top (bottom-left).
 */

/* —— Ruby chatbot: bottom-right —— */
#ruby-widget-root {
    position: fixed !important;
    right: 24px !important;
    left: auto !important;
    bottom: 24px !important;
    top: auto !important;
    inset-inline-end: 24px !important;
    inset-inline-start: auto !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0;
}

#ruby-widget-root .ruby-panel {
    right: 0 !important;
    left: auto !important;
    bottom: 76px !important;
}

#ruby-widget-root .ruby-launcher {
    position: relative;
    flex-shrink: 0;
    margin: 0;
    /* Size aligned with back-to-top control */
    width: 46px;
    height: 46px;
}

/* —— Back to top: bottom-left (all theme class names) —— */
.back-to-top-wrap,
.backtotop-wrap {
    right: auto !important;
    left: 24px !important;
    inset-inline-end: auto !important;
    inset-inline-start: 24px !important;
    bottom: 24px !important;
    z-index: 2147482000 !important;
}

@media (max-width: 575px) {
    #ruby-widget-root {
        right: 16px !important;
        bottom: 16px !important;
        inset-inline-end: 16px !important;
    }

    .back-to-top-wrap,
    .backtotop-wrap {
        left: 16px !important;
        inset-inline-start: 16px !important;
        bottom: 16px !important;
    }
}
