/* 自定义弹窗样式 - 符合网站主题 */

/* 遮罩层 */
.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.custom-modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 弹窗容器 */
.custom-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    width: 400px;
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

/* 弹窗头部 */
.custom-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-modal-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.custom-modal-icon.success {
    background-color: #d4edda;
    color: #27ae60;
}

.custom-modal-icon.error {
    background-color: #f8d7da;
    color: #dc3545;
}

.custom-modal-icon.warning {
    background-color: #fff3cd;
    color: #ffc107;
}

.custom-modal-icon.info {
    background-color: #d1ecf1;
    color: #17a2b8;
}

.custom-modal-icon.question {
    background-color: #e7f3ff;
    color: #27ae60;
}

.custom-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

/* 弹窗内容 */
.custom-modal-body {
    padding: 24px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

/* 弹窗底部 */
.custom-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.custom-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.custom-modal-btn:active {
    transform: translateY(0);
}

.custom-modal-btn-primary {
    background-color: #27ae60;
    color: white;
}

.custom-modal-btn-primary:hover {
    background-color: #229954;
}

.custom-modal-btn-secondary {
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.custom-modal-btn-secondary:hover {
    background-color: #e9ecef;
}

.custom-modal-btn-danger {
    background-color: #dc3545;
    color: white;
}

.custom-modal-btn-danger:hover {
    background-color: #c82333;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式 */
@media (max-width: 576px) {
    .custom-modal {
        width: 90%;
        max-width: none;
    }
    
    .custom-modal-header {
        padding: 16px 20px;
    }
    
    .custom-modal-body {
        padding: 20px;
    }
    
    .custom-modal-footer {
        padding: 12px 20px;
        flex-direction: column-reverse;
    }
    
    .custom-modal-btn {
        width: 100%;
    }
}

/* Toast 通知样式 */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

.custom-toast.hide {
    animation: slideOutRight 0.3s ease;
}

.custom-toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.custom-toast-message {
    flex: 1;
    color: #333;
    font-size: 14px;
}

.custom-toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
}

.custom-toast-close:hover {
    color: #666;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@media (max-width: 576px) {
    .custom-toast {
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}
