/**
 * Sticky Widget Styles
 * @version 3.6
 */

/* 佔位元素 - 用於保持頁面佈局 */
.sticky-widget-placeholder {
    display: none;
    visibility: hidden;
}

/* Sticky 啟用時的基本樣式 - 使用更高優先級的選擇器 */
section.sticky-widget.sticky-active,
aside.sticky-widget.sticky-active,
div.sticky-widget.sticky-active,
.sticky-widget.sticky-active {
    position: fixed !important;
    z-index: 9999 !important;
    transition: none !important;
    background-color: inherit;
    box-sizing: border-box !important;
}

/* Sticky 到達底部時（absolute 定位） */
section.sticky-widget.sticky-bottom,
aside.sticky-widget.sticky-bottom,
div.sticky-widget.sticky-bottom,
.sticky-widget.sticky-bottom {
    position: absolute !important;
    z-index: 9999 !important;
    box-sizing: border-box !important;
}

/* 確保 sticky-active 時的樣式正確套用 */
.sticky-widget.sticky-active[style],
.sticky-widget.sticky-bottom[style] {
    background-color: #fff;
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
}

/* RWD: 在手機上停用 sticky 效果 */
@media screen and (max-width: 768px) {
    section.sticky-widget.sticky-active,
    aside.sticky-widget.sticky-active,
    div.sticky-widget.sticky-active,
    .sticky-widget.sticky-active,
    section.sticky-widget.sticky-bottom,
    aside.sticky-widget.sticky-bottom,
    div.sticky-widget.sticky-bottom,
    .sticky-widget.sticky-bottom {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: auto !important;
        box-shadow: none !important;
    }
    
    .sticky-widget-placeholder {
        display: none !important;
    }
}
