/* 弹窗容器 - 全屏居中布局 */
.dialog-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 遮罩层 */
.dialog-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

/* 非模态框遮罩层 - 不拦截点击 */
.dialog-mask.non-modal {
    pointer-events: none;
    background: rgba(0, 0, 0, 0.2);
}

/* 弹窗主体 */
.dialog-box {
    width: 90%;
    height: 90%;
    background: var(--bg);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    overflow: hidden;
    min-width: 300px;
    min-height: 200px;
    transition: transform 0.3s ease;
    display:flex;
    flex-direction: column;
}

/* 可调整大小的弹窗 */
.dialog-box.resizable {
    resize: both;
    overflow: auto;
}

/* 弹窗标题栏 */
.dialog-title-bar {
    height: 48px;
    line-height: 48px;
    padding: 0 20px;
    background: var(--bg-title);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 弹窗标题文本 */
.dialog-title-text {
    font-weight: 500;
    color: var(--text-title);
    font-size: 16px;
}

/* 关闭按钮 */
.dialog-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s ease;
}

.dialog-close-btn:hover {
    color: var(--primary);
}

.dialog-close-btn:focus {
    outline: none;
}

/* iframe 容器 */
.dialog-iframe {
    width: 100%;
    border: none;
    display: block;
    flex:1;
}

/* 禁止背景滚动（弹窗打开时添加到 body） */
body.dialog-open {
    overflow: hidden;
}



.drawer-container {
    align-items: stretch;
    justify-content: flex-end;
}

/* 抽屉遮罩层 */
.drawer-mask {
    background: rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease;
}

/* 右侧抽屉主体样式 */
.drawer-box {
    resize: none; /* 禁用调整大小 */
    border-radius: 0; /* 取消圆角 */
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    height: 100%;
    width: auto;
    min-width: 240px;
    transform: translateX(100%); /* 默认隐藏在右侧 */
    transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
}

/* 抽屉显示时的状态 */
.drawer-container .drawer-box.drawer-right {
    transform: translateX(0); /* 滑入可视区域 */
}

/* 移动端右侧抽屉适配 */
@media screen and (max-width: 768px) {
    .drawer-box.drawer-right {
        min-width: 100%; /* 移动端占满宽度 */
    }
}

@media screen and (max-width: 768px) and (orientation: portrait) {

    .dialog-box {
        width: 100%;
        height: 100%;
        border-radius: 0px;
    }
}