/* Thanh tab dọc bên phải màn hình cho mọi trang desktop (tham khảo jd.com),
   nạp qua web.component.sideToolbar trong web.master. */
.side-toolbar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    background: #fff;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
    /* Dưới khung chat (.chat-box .chat-window z-index 100) để chat mở ra thì đè lên thanh tab */
    z-index: 99;
    display: flex;
    flex-direction: column;
}

.side-toolbar-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px 8px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    border-top: 1px solid #F0F0F0;
    transition: background-color .15s, color .15s;
}

.side-toolbar-item:first-child {
    border-top: 0;
    border-top-left-radius: 12px;
}

.side-toolbar-item:last-child {
    border-bottom-left-radius: 12px;
}

.side-toolbar-item:hover,
.side-toolbar-item:focus {
    color: #124CA7;
    background: #F1F5FB;
    text-decoration: none;
    outline: none;
}

.side-toolbar-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-toolbar-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.side-toolbar-label {
    margin-top: 4px;
    font-size: 11px;
    line-height: 14px;
    text-align: center;
    white-space: nowrap;
}

.side-toolbar-badge {
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #FD3124;
    border: 1px solid #fff;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    font-style: normal;
    line-height: 14px;
    text-align: center;
}

/* Nút "Lên đầu": chỉ hiện sau khi cuộn, cùng ngưỡng 600px với #btnscrollTop */
.side-toolbar-top {
    display: none;
}

.side-toolbar-top.show {
    display: flex;
}

/* Popover mã QR tải app, hiện khi rê chuột vào nút Tải app */
.side-toolbar-popover {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translate(8px, -50%);
    margin-right: 12px;
    width: 188px;
    padding: 12px 12px 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
    color: #333;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s, transform .15s, visibility .15s;
    cursor: default;
}

.side-toolbar-popover::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    margin-top: -6px;
    border: 6px solid transparent;
    border-left-color: #fff;
}

.side-toolbar-item:hover .side-toolbar-popover,
.side-toolbar-item:focus .side-toolbar-popover {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}

.side-toolbar-popover img {
    width: 140px;
    height: 140px;
    display: block;
    margin: 0 auto 8px;
}

.side-toolbar-popover p {
    margin: 0;
    font-size: 12px;
    line-height: 16px;
}

/* Dưới 992px ẩn thanh tab, giữ nút cuộn lên đầu cũ (#btnscrollTop) của master.
   Từ 992px trở lên thanh tab đã có nút "Lên đầu" nên ẩn nút cũ đi. */
@media (max-width: 991px) {
    .side-toolbar {
        display: none;
    }
}

@media (min-width: 992px) {
    #btnscrollTop {
        display: none !important;
    }
}
