﻿.overlay-layout {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top:12px;
}

.overlay-layout button {
    width: 150px;
    height: 40px;
    border: 1px solid #ddd;
    /* background: white; */
    cursor: pointer;
}

.overlay-layout .overlay-click-btn {
    padding: 10px;
    background-color: lightgray;
    border: none;
    cursor: pointer;

    width:64px;
}

.overlay-click-btn.active {
    background-color: #198754;
    color: white;
}

.overlay-layout .overlay-row {
    display: flex;
    margin-bottom: 5px;
}

/*.overlay-layout .overlay-row button {
    flex: 1;
    margin: 0 5px;
}*/

.overlay-layout .overlay-action {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

/*.overlay-layout .overlay-action span {
    cursor: pointer;
}*/

.overlay-layout .selected-item {
    background-color: #7fb542;
    color: white;
}

/* 二级级联面板（如"系列"的子类），紧贴一级面板右侧展开 */
.overlay-cascade {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 10px;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

/* 移动端适配：面板按钮较多时（如系列/主题）避免横向溢出屏幕 */
@media (max-width: 767.98px) {
    .overlay-layout {
        max-width: calc(100vw - 30px);
        max-height: 70vh;
        overflow-y: auto;
    }

    .overlay-layout .overlay-row {
        flex-wrap: wrap;
    }

    .overlay-layout button {
        width: calc(50% - 8px);
        margin: 2px 4px 2px 0;
    }

    /* 级联面板在小屏上改为堆叠在一级面板下方，而不是展开在右侧（避免超出屏幕） */
    .overlay-cascade {
        position: static;
        left: auto;
        top: auto;
        margin-left: 0;
        margin-top: 10px;
        max-width: 100%;
    }
}
