/* 简约风格自定义模态框样式 */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(2px);
}

.custom-modal.show {
    display: flex;
}

.custom-modal-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    width: 500px;
    max-width: 90vw;
    overflow: hidden;
    animation: slideIn 0.2s ease;
    border: 1px solid #e0e0e0;
}

.custom-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.custom-modal-title {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.custom-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    color: #666;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 18px;
}

.custom-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.custom-modal-body {
    padding: 20px 24px;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.custom-modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #f0f0f0;
}

.custom-modal-btn {
    padding: 8px 20px;
    border: 1px solid;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    min-width: 80px;
    outline: none;
}

.custom-modal-btn:focus {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.custom-modal-btn-primary {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.custom-modal-btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.custom-modal-btn-secondary {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.custom-modal-btn-secondary:hover {
    background: #c82333;
    border-color: #c82333;
}

.custom-modal-btn-cancel {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.custom-modal-btn-cancel:hover {
    background: #545b62;
    border-color: #545b62;
}

.custom-modal-btn-outline {
    background: transparent;
    border-color: #ddd;
    color: #666;
}

.custom-modal-btn-outline:hover {
    background: #f8f9fa;
    border-color: #ccc;
    color: #333;
}

/* 不同类型的模态框样式 */
.custom-modal.success .custom-modal-header {
    border-bottom-color: #28a745;
}

.custom-modal.success .custom-modal-title {
    color: #28a745;
}

.custom-modal.error .custom-modal-header {
    border-bottom-color: #dc3545;
}

.custom-modal.error .custom-modal-title {
    color: #dc3545;
}

.custom-modal.warning .custom-modal-header {
    border-bottom-color: #ffc107;
}

.custom-modal.warning .custom-modal-title {
    color: #856404;
}

.custom-modal.info .custom-modal-header {
    border-bottom-color: #17a2b8;
}

.custom-modal.info .custom-modal-title {
    color: #17a2b8;
}

/* 输入框样式 */
.custom-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin: 8px 0;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
    outline: none;
}

.custom-modal-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* 图标样式 */
.custom-modal-icon {
    font-size: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.custom-modal-icon.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.custom-modal-icon.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.custom-modal-icon.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.custom-modal-icon.info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

/* 消息内容容器 */
.custom-modal-message {
    flex: 1;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .custom-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .custom-modal-header,
    .custom-modal-body,
    .custom-modal-footer {
        padding: 16px 20px;
    }
    
    .custom-modal-btn {
        min-width: 70px;
        padding: 6px 16px;
    }
    
    .custom-modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .custom-modal-footer .custom-modal-btn {
        width: 100%;
    }
}

/* 加载动画 */
.custom-modal-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 简约风格的特殊样式 */
.custom-modal.minimal {
    background-color: rgba(0, 0, 0, 0.3);
}

.custom-modal.minimal .custom-modal-content {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: none;
}

.custom-modal.minimal .custom-modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.custom-modal.minimal .custom-modal-footer {
    border-top: none;
    padding-top: 0;
}

/* 无图标模式 */
.custom-modal.no-icon .custom-modal-body {
    justify-content: center;
    text-align: center;
}

.custom-modal.no-icon .custom-modal-icon {
    display: none;
}