/* 消息框遮罩层 */
.msgbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.25s, opacity 0.25s;
}

/* 消息框显示状态 */
.msgbox-overlay.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

/* 消息框容器 */
.msgbox-container {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.25s;
}

.msgbox-overlay.active .msgbox-container {
    transform: scale(1);
}

/* 消息框标题栏 */
.msgbox-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.msgbox-title {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

/* CSS绘制的关闭按钮 */
.msgbox-close {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.msgbox-close:hover {
    opacity: 1;
}

.msgbox-close::before,
.msgbox-close::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 16px;
    background-color: #333;
    top: 4px;
}

.msgbox-close::before {
    transform: rotate(45deg);
}

.msgbox-close::after {
    transform: rotate(-45deg);
}

/* 消息框内容区 */
.msgbox-body {
    padding: 20px;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    white-space: pre;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.msgbox-body-icon {
    font-size: 24px;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.msgbox-body-unicon {
    position: relative;
    left: 12px;
}

/* 消息框按钮区 */
.msgbox-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 按钮样式 */
.msgbox-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.msgbox-confirm {
    background-color: #007bff;
    color: white;
}

.msgbox-confirm:hover {
    background-color: #0056b3;
}

.msgbox-cancel {
    background-color: #f8f9fa;
    color: #333;
}

.msgbox-cancel:hover {
    background-color: #e2e6ea;
}
