@import url('variables.css');

#widget {
    --widget-height: 80px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 300px;
    margin-left: 21px;
    margin-bottom: 16px;
    border-radius: 21px;
    z-index: 1500;
    overflow: hidden;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

#widget.dodge-sidebar {
    left: var(--sidebar-width);
}

body.device-mobile #widget.dodge-sidebar {
    display: none;
}

#widget-body {
    border-radius: 21px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

#widget-drawer {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    align-content: flex-start;
    gap: 5px 2px;
    z-index: 1550;
    background-color: #ebedf2;
    transition: all 0.3s ease-in-out;
}

#widget-drawer.open {
    padding: 5px 5px 0 5px;
    height: calc(var(--widget-drawer-rows, 1) * var(--widget-height));
    max-height: calc(4 * var(--widget-height));
    /* overflow-y: scroll; */
    /* hotfix: uses up space on windows */
    transition: all 0.3s ease-in-out;
}

#widget-base {
    position: relative;
    width: 100%;
    height: var(--widget-height);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    align-content: flex-start;
    background-color: #fff;
    gap: 2px;
    z-index: 1600;
}

#widget .button-image {
    padding: 4px 13px 2px 13px;
    z-index: 20;
}

#widget .widget-button {
    height: calc(var(--widget-height) - 10px);
    width: 71px;
    border-radius: 17px;
    border-style: none;
    background-color: transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    justify-content: start;
    padding: 0;
}

#widget a.widget-button {
    text-decoration: none;
}

#widget-base .widget-button:first-child {
    margin-left: 5px;
}

#widget-base .widget-button:last-child {
    margin-right: 5px;
}

#widget-base .widget-button:hover {
    background-color: #e8ecef;
}

#widget-drawer .widget-button:hover {
    background-color: #d8dfe6;
}

#widget-base .widget-button.active,
#widget-drawer .widget-button.active {
    border: 1px solid #81b4ff;
    background-color: #accdff;
}

#widget-drawer .widget-button.active:hover,
#widget-base .widget-button.active:hover {
    background-color: #a9d3ff;
}

#widget .button-title {
    font-size: 11px;
    font-weight: 400;
    color: #515058;
    line-height: 1.15;
}

#widget-latch {
    position: relative;
    margin-left: calc(50% - 24px);
    width: 48px;
    height: 22px;
    border-radius: 17px 17px 0 0;
    color: #9da2a5;
    background-color: #eaeaeaba;
    z-index: 1500;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-top: 2px solid rgba(var(--bs-primary-rgb), 0.8);
    border-left: 2px solid rgba(var(--bs-primary-rgb), 0.8);
    border-right: 2px solid rgba(var(--bs-primary-rgb), 0.8);
}

#widget .external-link-hint {
    background: transparent url(../../files/image/icons/external-link.svg) 0 0 no-repeat;
    background-size: 12px 12px;
    z-index: 10;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 12px;
    height: 12px;
    transform: rotate(10deg);
}

#widget img.button-image {
    max-width: 73px;
}

/* START: scrollbar styling */

#widget-drawer {
    scrollbar-color: #AAA white;
    scrollbar-width: thin;
}

#widget-drawer::-webkit-scrollbar {
    width: 5px;
}

#widget-drawer::-webkit-scrollbar-track {
    opacity: 1.0;
}

#widget-drawer::-webkit-scrollbar-thumb {
    background: #AAA;
    opacity: 0.2;
}

#widget-drawer::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* END: scrollbar styling */