/* ====== 自定义Alert组件样式 ====== */

/* 遮罩层 */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

/* 淡入动画 */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* 淡出动画 */
@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* 弹窗滑入动画 */
@keyframes slideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* 弹窗滑出动画 */
@keyframes slideOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
}

/* 关闭状态 */
.custom-alert-overlay.closing {
    animation: fadeOut 0.25s forwards;
}

.custom-alert-overlay.closing .custom-alert-box {
    animation: slideOut 0.25s ease-in forwards;
}

/* 弹窗容器 */
.custom-alert-box {
    background: var(--color-card);
    border-radius: var(--radius-base);
    padding: 24px;
    min-width: 320px;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

/* 弹窗头部 */
.custom-alert-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

/* 图标样式 */
.custom-alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
}

.custom-alert-icon.info {
    background: rgba(90, 103, 242, 0.1);
    color: var(--color-primary);
}

.custom-alert-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.custom-alert-icon.warning {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

.custom-alert-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* 标题 */
.custom-alert-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

/* 消息内容 */
.custom-alert-message {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 输入框 */
.custom-alert-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    outline: none;
    transition: var(--transition-base);
    background: var(--color-card);
    color: var(--color-text);
}

.custom-alert-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(90, 103, 242, 0.1);
}

/* 按钮容器 */
.custom-alert-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 按钮基础样式 */
.custom-alert-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-base);
    font-weight: 500;
}

/* 主按钮 */
.custom-alert-btn.primary {
    background: var(--color-primary);
    color: white;
}

.custom-alert-btn.primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 103, 242, 0.3);
}

.custom-alert-btn.primary:active {
    transform: translateY(0);
}

/* 次要按钮 */
.custom-alert-btn.secondary {
    background: var(--color-inner);
    color: var(--color-text-light);
}

.custom-alert-btn.secondary:hover {
    background: var(--color-border-light);
}

.custom-alert-btn.secondary:active {
    transform: scale(0.98);
}

/* 暗色主题特殊处理 */
[data-theme="dark"] .custom-alert-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .custom-alert-icon.info {
    background: rgba(90, 103, 242, 0.2);
}

[data-theme="dark"] .custom-alert-icon.success {
    background: rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .custom-alert-icon.warning {
    background: rgba(251, 146, 60, 0.2);
}

[data-theme="dark"] .custom-alert-icon.error {
    background: rgba(239, 68, 68, 0.2);
}

/* 响应式设计 */
@media (max-width: 640px) {
    .custom-alert-box {
        min-width: 280px;
        max-width: calc(100vw - 32px);
        padding: 20px;
    }

    .custom-alert-title {
        font-size: 16px;
    }

    .custom-alert-message {
        font-size: 13px;
    }

    .custom-alert-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
}