/* ============================================================
   11选5 左侧悬浮窗：开奖公告 / 走势图
   两个入口固定在页面左侧，点击后弹出悬浮面板查看
   ============================================================ */

/* ---------- 左侧悬浮入口 ---------- */
.x5SideDock {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1650;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.x5SideBtn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 40px;
    padding: 13px 0;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #d93b3b, #a81d24);
    box-shadow: 0 2px 10px rgba(228, 57, 60, .35);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 1px;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s ease, transform .18s ease;
}

.x5SideBtn > span:last-child {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 1px;
}

.x5SideBtn:hover,
.x5SideBtn:focus {
    background: linear-gradient(180deg, #c73333, #992026);
    color: #fff;
}

.x5SideBtn:active {
    transform: scale(.96);
}

.x5SideBtn.is-active {
    background: linear-gradient(180deg, #c73333, #992026);
    box-shadow: 0 2px 14px rgba(228, 57, 60, .5);
}

.x5SideBtn .x5SideIcon {
    width: 18px;
    height: 18px;
    writing-mode: horizontal-tb;
}

.x5SideBtn .x5SideIcon svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- 开奖公告悬浮窗 ---------- */
.x5FloatMask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease;
}

.x5FloatMask.is-open {
    opacity: 1;
    visibility: visible;
}

.x5FloatPanel {
    display: flex;
    flex-direction: column;
    width: 580px;
    max-width: 94vw;
    max-height: 82vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .28);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform .18s ease;
}

.x5FloatMask.is-open .x5FloatPanel {
    transform: translateY(0);
}

.x5FloatHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    height: 50px;
    padding: 0 16px;
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.x5FloatTitle {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.x5FloatTitle::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 15px;
    margin-right: 2px;
    vertical-align: -2px;
    background: #e4393c;
    border-radius: 2px;
}

.x5FloatSub {
    font-size: 12px;
    font-weight: normal;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.x5FloatTools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.x5FloatRefresh {
    display: inline-block;
    height: 26px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 13px;
    background: #fff;
    color: #666;
    font-family: inherit;
    font-size: 12px;
    line-height: 24px;
    text-decoration: none;
    cursor: pointer;
    outline: none;
}

.x5FloatRefresh:hover {
    border-color: #e4393c;
    color: #e4393c;
}

.x5FloatClose {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 24px;
    line-height: 28px;
    cursor: pointer;
    outline: none;
}

.x5FloatClose:hover {
    color: #e4393c;
}

.x5FloatBody {
    flex: 1 1 auto;
    min-height: 120px;
    padding: 0 16px 14px;
    box-sizing: border-box;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.x5FloatBody table {
    width: 100% !important;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.x5FloatBody table th {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 36px;
    line-height: 36px;
    font-size: 12px;
    font-weight: normal;
    color: #666;
    text-align: center;
    background: #f6f7f9;
    border-bottom: 1px solid #e6e6e6;
}

.x5FloatBody table td {
    height: 36px;
    line-height: 36px;
    font-size: 13px;
    color: #666;
    text-align: center;
    border-bottom: 1px dashed #ebebeb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.x5FloatBody table td:nth-child(1) {
    color: #333;
}

.x5FloatBody table td:nth-child(2) {
    color: #e4393c;
    font-weight: 600;
    letter-spacing: 1px;
}

.x5FloatBody table tr:hover td {
    background: #fafafa;
}

.x5FloatLoading,
.x5FloatEmpty {
    padding: 40px 0;
    color: #999;
    font-size: 13px;
    text-align: center;
}

.x5FloatEmpty a {
    color: #e4393c;
    text-decoration: none;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
    .x5SideDock {
        left: 6px;
        gap: 8px;
    }

    .x5SideBtn {
        width: 34px;
        padding: 11px 0;
        font-size: 12px;
        border-radius: 7px;
    }

    .x5SideBtn .x5SideIcon,
    .x5SideBtn .x5SideIcon svg {
        width: 16px;
        height: 16px;
    }

    .x5FloatMask {
        padding: 12px;
        align-items: flex-end;
    }

    .x5FloatPanel {
        width: 100%;
        max-width: 100%;
        max-height: 78vh;
        border-radius: 10px 10px 0 0;
    }

    .x5FloatHead {
        height: 46px;
        padding: 0 12px;
    }

    .x5FloatBody {
        padding: 0 10px 10px;
    }

    .x5FloatBody table th,
    .x5FloatBody table td {
        font-size: 12px;
    }
}
