/* =========================================
   Modal Components - 模态框和弹窗组件样式
   ========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    overflow-y: auto;
    animation: zoomIn 0.2s ease-out;
    box-shadow: var(--shadow-float);
}

@keyframes zoomIn {
    from { transform: scale(0.9) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
}

/* Toast 通知 */
.toast-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-xl);
    font-size: 14px;
    z-index: 3000;
}

.toast-message.success { background: rgba(0, 0, 0, 0.8); }
.toast-message.error { background: rgba(255, 69, 58, 0.9); }

/* 消息操作菜单 */
.message-actions-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-color); /* 使用全局主题色 */
    border-radius: var(--border-radius-lg);
    padding: 8px;
    display: flex;
    gap: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-float);
    z-index: 2001;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease-out;
    min-width: 60px;
}

.action-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.action-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.action-item span {
    font-size: 12px;
    font-weight: 500;
}

/* 右键菜单 */
.context-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: transparent;
}

.context-menu {
    position: absolute;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-float);
    padding: 8px;
    min-width: 150px;
    z-index: 2001;
    animation: contextMenuShow 0.2s ease-out;
}

@keyframes contextMenuShow {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease-out;
    color: var(--text-main);
}

.context-menu-item:hover {
    background: #F5F5F5;
}

.context-menu-item i {
    font-size: 16px;
    color: #F44336;
}

.context-menu-item span {
    font-size: 14px;
    font-weight: 500;
}

/* 右键菜单动画 */
.context-menu-fade-enter-active, .context-menu-fade-leave-active {
    transition: all 0.2s ease;
}

.context-menu-fade-enter-from, .context-menu-fade-leave-to {
    opacity: 0;
}

.context-menu-fade-enter-from .context-menu {
    transform: scale(0.9) translateY(-5px);
}

.context-menu-fade-leave-to .context-menu {
    transform: scale(0.9) translateY(-5px);
}

/* 右键菜单项危险样式 */
.context-menu-item.danger {
    color: var(--danger);
}

.context-menu-item.danger:hover {
    background: #FFF5F5;
}

.context-menu-item.danger i {
    color: var(--danger);
}

/* 顶部菜单下拉 */
.top-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-float);
    z-index: 1000;
    min-width: 140px;
    margin-top: 8px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    gap: 10px;
}

.menu-item:hover {
    background: #F5F5F5;
}

.menu-item i {
    font-size: 16px;
    color: var(--text-sub);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
}
