/**
 * 通用弹窗样式
 * 基于 publish.html 的弹窗样式，支持多种类型
 */

/* 遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 弹窗容器 */
.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 1000;
    min-width: 300px;
    max-width: 500px;
    width: 90%;
    height: auto;
    overflow: visible;
}

/* 弹窗图标 */
.modal-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 弹窗内容区域 */
.modal-container .modal-content {
    margin-bottom: 15px;
    background: transparent !important;
    height: auto !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

/* 弹窗标题 */
.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

/* 弹窗消息 */
.modal-message {
    font-size: 16px;
    color: #666;
    margin: 0 0 25px 0;
    line-height: 1.6;
    word-wrap: break-word;
}

/* 按钮容器 */
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 0;
}

/* 通用按钮样式 */
.modal-button {
    background: transparent;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    min-width: 80px;
}

.modal-button:hover {
    border-color: #bfbfbf;
}

.modal-button:active {
    transform: translateY(1px);
}

/* 确定按钮 */
.modal-confirm-button {
    color: #333;
    border-color: #d9d9d9;
}

.modal-confirm-button:hover {
    border-color: #bfbfbf;
}

/* 取消按钮 */
.modal-cancel-button {
    color: #666;
    border-color: #d9d9d9;
}

.modal-cancel-button:hover {
    border-color: #bfbfbf;
}

/* 关闭按钮 */
.modal-close-button {
    color: #333;
    border-color: #d9d9d9;
}

.modal-close-button:hover {
    border-color: #bfbfbf;
}

/* 不同类型的弹窗样式 */

/* 成功类型 */
.modal-success .modal-title {
    color: #52c41a;
}

/* 错误类型 */
.modal-error .modal-title {
    color: #ff4d4f;
}

/* 警告类型 */
.modal-warning .modal-title {
    color: #faad14;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .modal-container {
        padding: 20px;
        min-width: 280px;
        width: 85%;
    }
    
    .modal-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal-message {
        font-size: 13px;
    }
}

/* 动画效果已移除 */

/* 确保弹窗在最顶层 */
.modal-overlay,
.modal-container {
    z-index: 9999;
}

/* 防止页面滚动 */
body.modal-open {
    overflow: hidden;
}
