/**
 * 评论操作菜单样式
 * 
 * 提供统一的评论操作按钮和下拉菜单样式
 */

/* 评论操作按钮容器 */
.uap-comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

/* 操作按钮基础样式 */
.uap-comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    background: none;
    border: none;
    color: var(--uap-text-muted);
    font-size: var(--uap-text-sm);
    cursor: pointer;
    border-radius: var(--uap-radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    line-height: 1;
}

.uap-comment-action-btn:hover {
    background: var(--uap-surface-hover);
    color: var(--uap-text);
}

.uap-comment-action-btn:active {
    transform: scale(0.95);
}

.uap-comment-action-btn:focus-visible {
    outline: 2px solid var(--uap-action-bg);
    outline-offset: 1px;
}

.uap-comment-action-btn.active {
    color: var(--uap-error);
}

.uap-comment-action-btn svg {
    flex-shrink: 0;
}

.uap-comment-action-btn span {
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* 更多菜单容器 */
.uap-comment-more-wrapper {
    position: relative;
    /* 移除 margin-left: auto，让按钮紧跟在回复按钮后面 */
}

.uap-comment-more-btn {
    padding: 4px;
}

.uap-comment-more-btn svg {
    /* 横向三个点的图标 */
    transform: rotate(0deg);
}

/* 下拉菜单 */
.uap-comment-dropdown {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 6px;
    min-width: 124px;
    padding: 6px;
    background: var(--uap-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--uap-border);
    border-radius: var(--uap-radius-md);
    box-shadow: var(--uap-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 100;
}

.uap-comment-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 下拉菜单项 */
.uap-comment-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: var(--uap-radius-sm);
    color: var(--uap-text);
    font-size: var(--uap-text-sm);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    line-height: 1.4;
}

.uap-comment-dropdown-item:hover,
.uap-comment-dropdown-item:focus {
    outline: none;
    background: var(--uap-surface-hover);
    color: var(--uap-text);
}

.uap-comment-dropdown-item.danger,
.uap-comment-dropdown-item.uap-comment-delete-btn {
    color: var(--uap-error);
}

.uap-comment-dropdown-item.danger:hover,
.uap-comment-dropdown-item.danger:focus,
.uap-comment-dropdown-item.uap-comment-delete-btn:hover {
    background: var(--uap-error-bg);
    color: #be123c;
}

.uap-comment-dropdown-item svg {
    flex-shrink: 0;
}

.uap-comment-dropdown-item span {
    flex: 1;
}

/* 响应式适配 */
@media (max-width: 640px) {
    .uap-comment-actions {
        gap: 12px;
    }
    
    .uap-comment-action-btn {
        padding: 4px 6px;
        font-size: 12px;
    }
    
    .uap-comment-dropdown {
        min-width: 100px;
    }
    
    .uap-comment-dropdown-item {
        padding: 8px 12px;
    }
}
