/* ==================== 弹出窗口样式 - 设计增强规范 ==================== */

/* 基础模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s var(--ease-standard);
}

.modal-overlay.show {
    display: flex !important;
    opacity: 1;
}

/* 模态框内容 */
.modal-dialog {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 90vw;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s var(--ease-enter);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 模态框头部 */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-standard);
    font-size: 24px;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

/* 模态框主体 */
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* 模态框底部 */
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--bg-primary);
}

/* 操作菜单样式 */
.action-menu {
    background: white;
    border-radius: 20px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.action-menu-item {
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s var(--ease-standard);
    color: var(--text-primary);
    font-size: 15px;
}

.action-menu-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.action-menu-item.danger {
    color: #EF4444;
}

.action-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.action-menu-icon {
    font-size: 20px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 确认对话框 */
.confirm-dialog {
    max-width: 320px;
    width: 90vw;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--primary-color);
}

.confirm-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.confirm-message {
    font-size: 14px;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* 底部弹出菜单 */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px 0;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s var(--ease-standard);
}

.bottom-sheet.show {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.bottom-sheet-header {
    padding: 0 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

.bottom-sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.bottom-sheet-content {
    padding: 0 24px;
}

/* 工具提示 */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s var(--ease-standard);
}

.tooltip.show {
    opacity: 1;
}

/* 加载提示 */
.loading-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    z-index: 3000;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.loading-toast.show {
    display: flex;
}

/* 成功/错误提示 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    display: none;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    animation: toastSlideDown 0.3s var(--ease-enter);
}

.toast.show {
    display: flex;
}

@keyframes toastSlideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon {
    color: #10B981;
}

.toast.error .toast-icon {
    color: #EF4444;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

