/* ================================================================
   fw-widget.css — 浮動小工具靜態結構樣式
   動態數值（尺寸/顏色/位置）由 fw_build_dynamic_css() 輸出
================================================================ */

/* ── 共用基礎 ── */
.fw-widget {
    overflow: hidden;
    transition:
        width  .45s cubic-bezier(.4,0,.2,1),
        height .45s cubic-bezier(.4,0,.2,1),
        border-radius .45s,
        box-shadow .3s;
}

/* ── 圖片模式內部 ── */
.fw-widget .fw-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fw-widget .fw-link-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.fw-widget .fw-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity .55s ease;
}

/* ── 控制按鈕列 ── */
.fw-widget .fw-controls {
    position: absolute;
    top: 7px;
    right: 7px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.fw-widget .fw-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s;
}
.fw-widget .fw-btn:hover { background: rgba(0,0,0,.82); transform: scale(1.1); }

/* ── 縮小還原圖示 ── */
.fw-widget .fw-restore-hint {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    color: #fff;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 0 3px rgba(0,0,0,.6));
}

/* ── 縮小狀態（桌機） ── */
.fw-widget.fw-is-minimized {
    width:  52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    cursor: pointer;
    background: rgba(20,20,20,.7) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    overflow: visible;
    animation: none !important;
}
.fw-widget.fw-is-minimized .fw-inner      { opacity: 0; pointer-events: none; }
.fw-widget.fw-is-minimized .fw-controls   { display: none; }
.fw-widget.fw-is-minimized .fw-text-link  { opacity: 0; pointer-events: none; }
.fw-widget.fw-is-minimized .fw-restore-hint { display: flex; }
.fw-widget.fw-is-minimized:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,.45);
}

/* ── 文字模式：豎排數字橫式 ── */
.fw-widget .fw-num-h {
    text-combine-upright: all;
    -webkit-text-combine: horizontal;
}
