/* Sidebar Float Widget */
.sf-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    overflow: visible;
}

/* Item */
.sf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 8px;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: visible !important;
    transition: background-color 0.3s;
    border-bottom: 1px solid #f0f0f0;
}

.sf-item:last-child {
    border-bottom: none;
}

.sf-item:hover {
    background-color: #f5f5f5;
}

.sf-item:first-child {
    border-radius: 8px 8px 0 0;
}

.sf-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Icon */
.sf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.sf-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Title */
.sf-title {
    font-size: 10px;
    font-weight: 500;
    color: #00a0e9;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
}

/* Hover Popup */
.sf-hover-popup {
    position: absolute;
    right: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 99999;
    min-width: 200px;
}

.sf-item:hover .sf-hover-popup {
    display: block;
}

.sf-hover-popup img {
    width: 200px !important;
    height: 200px !important;
    max-width: none !important;
    object-fit: contain;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Arrow */
.sf-popup-arrow {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #fff;
}

/* Mobile */
@media (max-width: 768px) {
    .sf-sidebar {
        flex-direction: row;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 0;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    }

    .sf-item {
        flex: 1;
        padding: 8px 5px;
        border-bottom: none;
        border-right: 1px solid #f0f0f0;
    }

    .sf-item:last-child {
        border-right: none;
        border-radius: 0;
    }

    .sf-item:first-child {
        border-radius: 0;
    }

    .sf-icon img {
        width: 28px;
        height: 28px;
    }

    .sf-icon {
        margin-bottom: 4px;
    }

    .sf-title {
        font-size: 10px;
    }

    .sf-hover-popup {
        position: fixed;
        right: auto;
        left: 50%;
        top: auto;
        bottom: 70px;
        transform: translateX(-50%);
    }

    .sf-popup-arrow {
        right: auto;
        left: 50%;
        top: auto;
        bottom: -8px;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid #fff;
        border-bottom: none;
    }

    .sf-hover-popup img {
        width: 160px !important;
        height: 160px !important;
    }
}
