/* Userway Accessibility Widget Positioning */
/* Prevents widget from overlapping with header/username and other UI elements */

/* Target the Userway widget button - using correct selectors */
#userway-widget,
[class*="userway"],
[class*="uw-"],
[data-userway] {
    position: fixed !important;
    bottom: auto !important;
    right: 20px !important;
    top: auto !important;
    left: auto !important;
    z-index: 9998 !important;
    margin-top: 0 !important;
}

/* Userway main container when open - override inline styles */
main.uwaw,
.uwaw.main,
[class*="uwaw"][class*="main"] {
    position: fixed !important;
    top: 100px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 120px) !important;
    max-width: 400px !important;
}

/* Userway app dialog container */
.uwaw-app {
   max-height: 100% !important;
    overflow-y: auto !important;
}

/* Additional positioning to ensure it's below the header/navbar area */
@media (min-width: 769px) {
    #userway-widget,
    [class*="userway"],
    [class*="uw-"],
    [data-userway] {
        top: 50px !important;
    }
    
    /* Panel positioning for desktop */
    main.uwaw,
    .uwaw.main,
    [class*="uwaw"][class*="main"] {
       max-height: calc(100vh - 120px) !important;
        max-width: 400px !important;
    }
}

/* Ensure widget doesn't overlap with header on smaller screens */
@media (max-width: 768px) {
    #userway-widget,
    [class*="userway"],
    [class*="uw-"],
    [data-userway] {
        bottom: 20px !important;
        right: 10px !important;
    }
    
    /* Panel positioning for mobile */
    main.uwaw,
    .uwaw.main,
    [class*="uwaw"][class*="main"] {
        top: 80px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 100px) !important;
    }
}

