/* 前后台共用：广告图文字/按钮图层
 * 设计参考宽度 1200px，--layer-size 即设计稿像素值，
 * 保证后台画布与前台渲染所见即所得。
 */
.banner-overlay-box,
.canvas-layers.banner-overlay-box {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    container-type: inline-size;
    container-name: banner-overlay;
    --banner-unit: calc(100cqw / 1200);
}

.banner-overlay-layer {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    max-width: 90%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: calc(var(--layer-size, 28) * var(--banner-unit, 1px));
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    white-space: pre-wrap;
    word-break: break-word;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    cursor: default;
}

.banner-overlay-layer.is-btn {
    text-shadow: none;
    border-radius: 999px;
    padding: 0.55em 1.35em;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.banner-overlay-link {
    color: inherit;
    text-decoration: none;
}

/* 后台编辑态 */
.banner-overlay-layer.layer {
    cursor: move;
}
.banner-overlay-layer.layer.is-selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
    z-index: 30;
}
.banner-overlay-layer.layer.is-btn.is-selected {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 6px 18px rgba(15, 23, 42, 0.18);
}
.banner-overlay-layer.layer.is-editing {
    cursor: text;
    z-index: 31;
}

/* 内页 banner 舞台：为图层与蒙版提供定位上下文 */
.banner-stage {
    position: relative;
    overflow: hidden;
}
.banner-stage__link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.banner-stage__mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}
.banner-stage__mask.is-frost {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

@supports not (width: 1cqw) {
    .banner-overlay-box,
    .canvas-layers.banner-overlay-box {
        --banner-unit: 1px;
    }
}
